Official The Many Worlds Wiki themanyworldswikiwiki https://themanyworldswiki.miraheze.org/wiki/Main_Page MediaWiki 1.41.0 first-letter Media Special Talk User User talk Official The Many Worlds Wiki Official The Many Worlds Wiki talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Campaign Campaign talk Module Module talk Main Page 0 1 1 2024-05-27T22:04:21Z MediaWiki default 1 Welcome to Miraheze! wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phorge:|Phorge]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 070d9e6457eab136df99905438a1f57c037772b0 2 1 2024-05-27T23:45:39Z Armoleb 2 wikitext text/x-wiki __NOTOC__ <div style="width:95%; background:#eef7ff; margin:1.2em 0 3px 0; border: solid #33475a; border-width: 0px 0px 0.2em ; padding:0.5em; color:black; font-size:30px; text-align:center; font-family:Verdana;> Welcome to the official The Many Worlds wiki!<br> <div style= "font-size:20px;">''The Official The Many Worlds Wiki''</div> </div> <br> <!-- Article Box --> </div> </div> </div> </div></div> </div> <div style="align-items:stretch;display:flex;"> <!-- Article Box --> <div style="margin:.5rem;width:100%; background:#eef7ff; margin:1.2em 0 3px 0; padding:0.5em; color:black; text-align:left; font-family:Verdana;"> <div style= "font-size:20px;border: solid #33475a; border-width: 0px 0px 0.2em ;">Intro</div> <div style= "font-size:15px; text-align:left;padding:0.5em;">This is the official The Many Worlds Wiki, a huge encyclopedia to write detailed parts of what our members contribute to the series!<br> The Official The Many Worlds Wiki maintains a status of minimal spam and spam articles. Users not authorized by The League Wiki management are not allowed to edit pages by default and must contact the management in the Discord server to be authorized. If you are new to the Wiki, please read this [[Help:Getting started|guide]] before editing and making stuff. {|style="height:4rem; width:100%" |- style="text-align:center" |style="width:50%"|<span style="font-size:1.5em;">'''[[Special:Statistics |{{NUMBEROFARTICLES}} ]]'''</span><br/>Articles are currently on the Wiki<br> |} </div> </div> <div style="float:right;margin:.5rem;width:50%; background:#eef7ff; margin:1.2em 1rem 3px 1rem; padding:0.5em; color:black; text-align:left; font-family:Verdana;"> <div style= "font-size:20px;border: solid #33475a; border-width: 0px 0px 0.2em ;">Portal Navigation</div> <div style= "font-size:15px; text-align:left;padding:0.5em;"> *<div style= "font-size:20px;">[[Portal:The World|The World]]</div> **[[Portal:Askanelle|Askanelle]] **[[Portal:Commune of the Brazilian States|CBS]] **[[Portal:Nurland|Nurland]] </div></div> </div> </div> <div style= "margin:1.2em 10px 3px 10px; width:100%; background:#eef7ff; padding:0.5em; color:black; text-align:left; font-family:Verdana;"> <div style= "font-size:20px;border: solid #33475a; border-width: 0px 0px 0.2em ; width:95%">Random Pages</div> <div style= "font-size:15px; text-align:left;padding:0.5em;"> <randompages limit="5" namespace="true" levels="10"/> </div></div> </div> </div> </div></div> </div> b8cf6e224944adb13aa90d741f1fc3ce5a37a9d3 3 2 2024-05-28T00:13:26Z Armoleb 2 Protected "[[Main Page]]" ([Edit=Protect from non-authors] (indefinite) [Move=Protect from non-authors] (indefinite)) wikitext text/x-wiki __NOTOC__ <div style="width:95%; background:#eef7ff; margin:1.2em 0 3px 0; border: solid #33475a; border-width: 0px 0px 0.2em ; padding:0.5em; color:black; font-size:30px; text-align:center; font-family:Verdana;> Welcome to the official The Many Worlds wiki!<br> <div style= "font-size:20px;">''The Official The Many Worlds Wiki''</div> </div> <br> <!-- Article Box --> </div> </div> </div> </div></div> </div> <div style="align-items:stretch;display:flex;"> <!-- Article Box --> <div style="margin:.5rem;width:100%; background:#eef7ff; margin:1.2em 0 3px 0; padding:0.5em; color:black; text-align:left; font-family:Verdana;"> <div style= "font-size:20px;border: solid #33475a; border-width: 0px 0px 0.2em ;">Intro</div> <div style= "font-size:15px; text-align:left;padding:0.5em;">This is the official The Many Worlds Wiki, a huge encyclopedia to write detailed parts of what our members contribute to the series!<br> The Official The Many Worlds Wiki maintains a status of minimal spam and spam articles. Users not authorized by The League Wiki management are not allowed to edit pages by default and must contact the management in the Discord server to be authorized. If you are new to the Wiki, please read this [[Help:Getting started|guide]] before editing and making stuff. {|style="height:4rem; width:100%" |- style="text-align:center" |style="width:50%"|<span style="font-size:1.5em;">'''[[Special:Statistics |{{NUMBEROFARTICLES}} ]]'''</span><br/>Articles are currently on the Wiki<br> |} </div> </div> <div style="float:right;margin:.5rem;width:50%; background:#eef7ff; margin:1.2em 1rem 3px 1rem; padding:0.5em; color:black; text-align:left; font-family:Verdana;"> <div style= "font-size:20px;border: solid #33475a; border-width: 0px 0px 0.2em ;">Portal Navigation</div> <div style= "font-size:15px; text-align:left;padding:0.5em;"> *<div style= "font-size:20px;">[[Portal:The World|The World]]</div> **[[Portal:Askanelle|Askanelle]] **[[Portal:Commune of the Brazilian States|CBS]] **[[Portal:Nurland|Nurland]] </div></div> </div> </div> <div style= "margin:1.2em 10px 3px 10px; width:100%; background:#eef7ff; padding:0.5em; color:black; text-align:left; font-family:Verdana;"> <div style= "font-size:20px;border: solid #33475a; border-width: 0px 0px 0.2em ; width:95%">Random Pages</div> <div style= "font-size:15px; text-align:left;padding:0.5em;"> <randompages limit="5" namespace="true" levels="10"/> </div></div> </div> </div> </div></div> </div> b8cf6e224944adb13aa90d741f1fc3ce5a37a9d3 Template:Documentation 10 2 4 2024-05-28T01:07:18Z Armoleb 2 Created page with "{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude>" wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Askirora (city) 0 3 5 2024-05-28T01:29:42Z Armoleb 2 Created page with "{{Infobox settlement | name = Askirora | native_name = {{plainlist| * الأسكرونا }} | settlement_type = National Capital | image_skyline = pictureofAskirora.jpg | imagesize = 275px <!--default is 250px--> | image_caption = Western Askirora and its nightlife. | image_flag = | image_seal = | etymology = | nickname = "Heart of Aarellia" | motto = | image_map = Default pfp.jpg | map_caption = Location in [[Askanelle]] | pushpin_map = | pushpin_map..." wikitext text/x-wiki {{Infobox settlement | name = Askirora | native_name = {{plainlist| * الأسكرونا }} | settlement_type = National Capital | image_skyline = pictureofAskirora.jpg | imagesize = 275px <!--default is 250px--> | image_caption = Western Askirora and its nightlife. | image_flag = | image_seal = | etymology = | nickname = "Heart of Aarellia" | motto = | image_map = Default pfp.jpg | map_caption = Location in [[Askanelle]] | pushpin_map = | pushpin_map_caption = | coordinates = | coordinates_footnotes = | subdivision_type = Country | subdivision_name = [[File:Askanelle.png|25px|Askanelle]] [[Askanelle]] | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = [[Governorates of Askanelle|Governorate]] | subdivision_name2 = [[Eskiiroraa (Governorate)|Eskiiroraa]] | established_title = Established | established_date = 1300s | established_title2 = | established_date2 = | founder = Phonecians | named_for = | government_type = Mayor-Council with Federal Oversight | leader_title = [[Mayor of Askirora|Mayor]] | leader_name = [[Sadir Charbel]] | leader_party = [[God's Homeland (Askani political party)|GHP]] | unit_pref = | area_footnotes = | area_magnitude = | area_total_sq_mi = | area_land_sq_mi = | area_water_sq_mi = | area_water_percent = | area_urban_sq_mi = | area_metro_sq_mi = | elevation_footnotes = | elevation_ft = | elevation_m = | population_as_of = 2023 | population_footnotes = | population_total = 9,000,000 | population_rank = 2nd | population_density_sq_mi = <!-- 2023 population_est / area_land_sq_mi --> | population_urban = | population_density_urban_sq_mi = auto | population_metro = | population_density_metro_sq_mi = auto | population_demonym = [[Askani]], [[Askirorite]] | timezone = [[Askirora Standard Time|AST]] | utc_offset = | timezone_DST = | utc_offset_DST = | area_code_type = | area_code = 0010 | blank_name = | blank_info = | blank1_name = | blank1_info = | website = | footnotes = }} {{About|the capital of Askanelle|its capital district|Askirora Capital District}} {{redirect-multi|4|Eskirora|Eskiiroraa|Askirura|Askiirura|the village in [[Darmade]]|Little Askirora|other uses|Askirora (disambiguation))}} '''Askirora''' ([[Aarellian]]: الأسكرنا ; Al 'Askruna) is the capital city of [[Askanelle]] and is located on its western coast. It has an estimated population of 9 million people, putting it in second to [[Keirut]]. Askirora is considered the economic capital of the [[Unjite Region]], as the city is rich with big businesses like [[Sakour]] and economic prosperity. The city is also one of the oldest continuously inhabited cities in the world, build at the time of Phonecia. [[Category:Askanelle]] [[Category:Cities]] 8e0ef90d832bc3044e7024d464343e8aff007069 Module:Documentation 828 4 6 2024-05-28T02:29:51Z Armoleb 2 Created page with "-- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in..." Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p d6c1bffca24be2d81fa882315ac613f5bb6b227c Template:Infobox settlement 10 5 7 2024-05-28T03:13:16Z Armoleb 2 Created page with "{{Infobox settlement | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | image_flag = | flag_alt = | image_seal = | seal_alt = | image_shield = | shield_alt..." wikitext text/x-wiki {{Infobox settlement | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | image_flag = | flag_alt = | image_seal = | seal_alt = | image_shield = | shield_alt = | etymology = | nickname = | motto = | image_map = | map_alt = | map_caption = | pushpin_map = | pushpin_map_alt = | pushpin_map_caption = | pushpin_label_position = | coordinates = <!-- {{coord|latitude|longitude|type:city|display=inline,title}} --> | coor_pinpoint = | coordinates_footnotes = | subdivision_type = Country | subdivision_name = | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = | established_date = | founder = | seat_type = | seat = | government_footnotes = | government_type = | governing_body = | leader_party = | leader_title = | leader_name = | leader_title1 = | leader_name1 = | leader_title2 = | leader_name2 = | leader_title3 = | leader_name3 = | leader_title4 = | leader_name4 = | unit_pref = Metric <!-- ALL fields with measurements have automatic unit conversion --> <!-- for references: use <ref> tags --> | area_footnotes = | area_urban_footnotes = <!-- <ref> </ref> --> | area_rural_footnotes = <!-- <ref> </ref> --> | area_metro_footnotes = <!-- <ref> </ref> --> | area_magnitude = <!-- <ref> </ref> --> | area_note = | area_water_percent = | area_rank = | area_blank1_title = | area_blank2_title = <!-- square kilometers --> | area_total_km2 = | area_land_km2 = | area_water_km2 = | area_urban_km2 = | area_rural_km2 = | area_metro_km2 = | area_blank1_km2 = | area_blank2_km2 = <!-- hectares --> | area_total_ha = | area_land_ha = | area_water_ha = | area_urban_ha = | area_rural_ha = | area_metro_ha = | area_blank1_ha = | area_blank2_ha = | length_km = | width_km = | dimensions_footnotes = | elevation_footnotes = | elevation_m = | population_footnotes = | population_as_of = | population_total = | population_density_km2 = auto | population_note = | population_demonym = | timezone1 = | utc_offset1 = | timezone1_DST = | utc_offset1_DST = | postal_code_type = | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} 11d17d8e9a671c022b8f4c484e133f609f76db85 9 7 2024-05-28T03:16:51Z Armoleb 2 wikitext text/x-wiki {{Infobox settlement | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | image_flag = | flag_alt = | image_seal = | seal_alt = | image_shield = | shield_alt = | etymology = | nickname = | motto = | image_map = | map_alt = | map_caption = | pushpin_map = | pushpin_map_alt = | pushpin_map_caption = | pushpin_label_position = | coordinates = <!-- {{coord|latitude|longitude|type:city|display=inline,title}} --> | coor_pinpoint = | coordinates_footnotes = | subdivision_type = Country | subdivision_name = | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = | established_date = | founder = | seat_type = | seat = | government_footnotes = | government_type = | governing_body = | leader_party = | leader_title = | leader_name = | leader_title1 = | leader_name1 = | leader_title2 = | leader_name2 = | leader_title3 = | leader_name3 = | leader_title4 = | leader_name4 = | unit_pref = Metric <!-- ALL fields with measurements have automatic unit conversion --> <!-- for references: use <ref> tags --> | area_footnotes = | area_urban_footnotes = <!-- <ref> </ref> --> | area_rural_footnotes = <!-- <ref> </ref> --> | area_metro_footnotes = <!-- <ref> </ref> --> | area_magnitude = <!-- <ref> </ref> --> | area_note = | area_water_percent = | area_rank = | area_blank1_title = | area_blank2_title = <!-- square kilometers --> | area_total_km2 = | area_land_km2 = | area_water_km2 = | area_urban_km2 = | area_rural_km2 = | area_metro_km2 = | area_blank1_km2 = | area_blank2_km2 = <!-- hectares --> | area_total_ha = | area_land_ha = | area_water_ha = | area_urban_ha = | area_rural_ha = | area_metro_ha = | area_blank1_ha = | area_blank2_ha = | length_km = | width_km = | dimensions_footnotes = | elevation_footnotes = | elevation_m = | population_footnotes = | population_as_of = | population_total = | population_density_km2 = auto | population_note = | population_demonym = | timezone1 = | utc_offset1 = | timezone1_DST = | utc_offset1_DST = | postal_code_type = | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} [[Category:Infobox templates]] f41149d7bfd8efa88874ec05c3415aed5f9ec57e 14 9 2024-05-28T20:28:31Z Armoleb 2 wikitext text/x-wiki {{Infobox | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | image_flag = | flag_alt = | image_seal = | seal_alt = | image_shield = | shield_alt = | etymology = | nickname = | motto = | image_map = | map_alt = | map_caption = | pushpin_map = | pushpin_map_alt = | pushpin_map_caption = | pushpin_label_position = | coordinates = <!-- {{coord|latitude|longitude|type:city|display=inline,title}} --> | coor_pinpoint = | coordinates_footnotes = | subdivision_type = Country | subdivision_name = | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = | established_date = | founder = | seat_type = | seat = | government_footnotes = | government_type = | governing_body = | leader_party = | leader_title = | leader_name = | leader_title1 = | leader_name1 = | leader_title2 = | leader_name2 = | leader_title3 = | leader_name3 = | leader_title4 = | leader_name4 = | unit_pref = Metric <!-- ALL fields with measurements have automatic unit conversion --> <!-- for references: use <ref> tags --> | area_footnotes = | area_urban_footnotes = <!-- <ref> </ref> --> | area_rural_footnotes = <!-- <ref> </ref> --> | area_metro_footnotes = <!-- <ref> </ref> --> | area_magnitude = <!-- <ref> </ref> --> | area_note = | area_water_percent = | area_rank = | area_blank1_title = | area_blank2_title = <!-- square kilometers --> | area_total_km2 = | area_land_km2 = | area_water_km2 = | area_urban_km2 = | area_rural_km2 = | area_metro_km2 = | area_blank1_km2 = | area_blank2_km2 = <!-- hectares --> | area_total_ha = | area_land_ha = | area_water_ha = | area_urban_ha = | area_rural_ha = | area_metro_ha = | area_blank1_ha = | area_blank2_ha = | length_km = | width_km = | dimensions_footnotes = | elevation_footnotes = | elevation_m = | population_footnotes = | population_as_of = | population_total = | population_density_km2 = auto | population_note = | population_demonym = | timezone1 = | utc_offset1 = | timezone1_DST = | utc_offset1_DST = | postal_code_type = | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} [[Category:Infobox templates]] eadf31c88b3da98bf0682da277e9ce3b0a6f1782 Template:Infobox settlement/doc 10 6 8 2024-05-28T03:15:42Z Armoleb 2 Created page with "{{Documentation subpage}} <!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--> {{Intricate template}} {{Auto short description}} {{#ifeq:{{FULLPAGENAME}}|Template:Infobox settlement|{{high-risk| 503857 | all-pages = yes |info=}}}} {{Lua|Module:Infobox|Module:InfoboxImage|Module:Coordinates|Module:Check for unknown parameters|Module:Settlement short description}} {{Uses Wikidata|P41|P94|P158|P625|P856}}..." wikitext text/x-wiki {{Documentation subpage}} <!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--> {{Intricate template}} {{Auto short description}} {{#ifeq:{{FULLPAGENAME}}|Template:Infobox settlement|{{high-risk| 503857 | all-pages = yes |info=}}}} {{Lua|Module:Infobox|Module:InfoboxImage|Module:Coordinates|Module:Check for unknown parameters|Module:Settlement short description}} {{Uses Wikidata|P41|P94|P158|P625|P856}} This template is aliased or used as a sub-template for several infobox front-end templates. It should be used to produce an [[WP:Infobox|Infobox]] for human settlements (cities, towns, villages, communities) as well as other administrative districts, counties, provinces, et cetera—in fact, any subdivision below the level of a country, for which {{tl|Infobox country}} should be used. Parameters are described in the table below. For questions, see the [[Template talk:Infobox settlement|talk page]]. For a U.S. city guideline, see [[WP:USCITIES]]. ==Usage== * '''Important''': Please enter all numeric values in a raw, unformatted fashion. References are to be included in their respective section footnotes field. Numeric values that are not "raw" may create an "Expression error". Raw values will be automatically formatted by the template. If you find a raw value is not formatted in your usage of the template, please post a notice on the discussion page for this template. * An expression error may also occur when any coordinate parameter has a value, but one or more coordinate parameters are blank or invalid. Basic blank template, ready to cut and paste. See the next section for a copy of the template with all parameters and comments. See the table below that for a full description of each parameter. ===Using metric units=== <pre style="overflow:auto"> {{Infobox settlement | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | image_flag = | flag_alt = | image_seal = | seal_alt = | image_shield = | shield_alt = | etymology = | nickname = | motto = | image_map = | map_alt = | map_caption = | pushpin_map = | pushpin_map_alt = | pushpin_map_caption = | pushpin_label_position = | coordinates = <!-- {{coord|latitude|longitude|type:city|display=inline,title}} --> | coor_pinpoint = | coordinates_footnotes = | subdivision_type = Country | subdivision_name = | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = | established_date = | founder = | seat_type = | seat = | government_footnotes = | government_type = | governing_body = | leader_party = | leader_title = | leader_name = | leader_title1 = | leader_name1 = | leader_title2 = | leader_name2 = | leader_title3 = | leader_name3 = | leader_title4 = | leader_name4 = | unit_pref = Metric <!-- ALL fields with measurements have automatic unit conversion --> <!-- for references: use <ref> tags --> | area_footnotes = | area_urban_footnotes = <!-- <ref> </ref> --> | area_rural_footnotes = <!-- <ref> </ref> --> | area_metro_footnotes = <!-- <ref> </ref> --> | area_magnitude = <!-- <ref> </ref> --> | area_note = | area_water_percent = | area_rank = | area_blank1_title = | area_blank2_title = <!-- square kilometers --> | area_total_km2 = | area_land_km2 = | area_water_km2 = | area_urban_km2 = | area_rural_km2 = | area_metro_km2 = | area_blank1_km2 = | area_blank2_km2 = <!-- hectares --> | area_total_ha = | area_land_ha = | area_water_ha = | area_urban_ha = | area_rural_ha = | area_metro_ha = | area_blank1_ha = | area_blank2_ha = | length_km = | width_km = | dimensions_footnotes = | elevation_footnotes = | elevation_m = | population_footnotes = | population_as_of = | population_total = | population_density_km2 = auto | population_note = | population_demonym = | timezone1 = | utc_offset1 = | timezone1_DST = | utc_offset1_DST = | postal_code_type = | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} </pre> ===Using non-metric units=== <pre style="overflow:auto"> {{Infobox settlement | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | image_flag = | flag_alt = | image_seal = | seal_alt = | image_shield = | shield_alt = | etymology = | nickname = | motto = | image_map = | map_alt = | map_caption = | pushpin_map = | pushpin_map_alt = | pushpin_map_caption = | pushpin_label_position = | coordinates = <!-- {{coord|latitude|longitude|type:city|display=inline,title}} --> | coor_pinpoint = | coordinates_footnotes = | subdivision_type = Country | subdivision_name = | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | subdivision_type3 = | subdivision_name3 = | established_title = | established_date = | founder = | seat_type = | seat = | government_footnotes = | leader_party = | leader_title = | leader_name = | unit_pref = US<!-- or UK --> <!-- ALL fields with measurements have automatic unit conversion --> <!-- for references: use <ref> tags --> | area_footnotes = | area_urban_footnotes = <!-- <ref> </ref> --> | area_rural_footnotes = <!-- <ref> </ref> --> | area_metro_footnotes = <!-- <ref> </ref> --> | area_magnitude = <!-- use only to set a special wikilink --> | area_note = | area_water_percent = | area_rank = | area_blank1_title = | area_blank2_title = <!-- square miles --> | area_total_sq_mi = | area_land_sq_mi = | area_water_sq_mi = | area_urban_sq_mi = | area_rural_sq_mi = | area_metro_sq_mi = | area_blank1_sq_mi = | area_blank2_sq_mi = <!-- acres --> | area_total_acre = | area_land_acre = | area_water_acre = | area_urban_acre = | area_rural_acre = | area_metro_acre = | area_blank1_acre = | area_blank2_acre = | length_mi = | width_mi = | dimensions_footnotes = | elevation_footnotes = | elevation_ft = | population_footnotes = | population_as_of = | population_total = | population_density_sq_mi= auto | population_note = | population_demonym = | timezone1 = | utc_offset1 = | timezone1_DST = | utc_offset1_DST = | postal_code_type = | postal_code = | area_code_type = | area_code = | iso_code = | website = <!-- {{URL|example.com}} --> | footnotes = }} </pre> ===Short version=== <pre style="overflow:auto"> {{Infobox settlement | name = | native_name = | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | settlement_type = | image_skyline = | image_alt = | image_caption = | etymology = | nickname = | coordinates = <!-- {{Coord}} --> | population_total = | subdivision_type = Country | subdivision_name = | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = | website = <!-- {{URL|example.com}} --> }} </pre> ===Complete empty syntax, with comments=== This copy of the template lists all parameters except for some of the repeating numbered parameters which are noted in the comments. Comments here should be brief; see the table below for full descriptions of each parameter. <pre style="overflow:auto;"> {{Infobox settlement | name = <!-- at least one of the first two fields must be filled in --> | official_name = | native_name = <!-- if different from the English name --> | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | other_name = | settlement_type = <!-- such as Town, Village, City, Borough etc. --> <!-- transliteration(s) --> | translit_lang1 = | translit_lang1_type = | translit_lang1_info = | translit_lang1_type1 = | translit_lang1_info1 = | translit_lang1_type2 = | translit_lang1_info2 = <!-- etc., up to translit_lang1_type6 / translit_lang1_info6 --> | translit_lang2 = | translit_lang2_type = | translit_lang2_info = | translit_lang2_type1 = | translit_lang2_info1 = | translit_lang2_type2 = | translit_lang2_info2 = <!-- etc., up to translit_lang2_type6 / translit_lang2_info6 --> <!-- images, nickname, motto --> | image_skyline = | imagesize = | image_alt = | image_caption = | image_flag = | flag_size = | flag_alt = | flag_border = | flag_link = | image_seal = | seal_size = | seal_alt = | seal_link = | seal_type = | image_shield = | shield_size = | shield_alt = | shield_link = | image_blank_emblem = | blank_emblem_type = | blank_emblem_size = | blank_emblem_alt = | blank_emblem_link = | etymology = | nickname = | nicknames = | motto = | mottoes = | anthem = <!-- maps and coordinates --> | image_map = | mapsize = | map_alt = | map_caption = | image_map1 = | mapsize1 = | map_alt1 = | map_caption1 = | pushpin_map = <!-- name of a location map as per Template:Location_map --> | pushpin_mapsize = | pushpin_map_alt = | pushpin_map_caption = | pushpin_map_caption_notsmall = | pushpin_label = <!-- only necessary if "name" or "official_name" are too long --> | pushpin_label_position = <!-- position of the pushpin label: left, right, top, bottom, none --> | pushpin_outside = | pushpin_relief = | pushpin_image = | pushpin_overlay = | coordinates = <!-- {{Coord}} --> | coor_pinpoint = <!-- to specify exact location of coordinates (was coor_type) --> | coordinates_footnotes = <!-- for references: use <ref> tags --> | grid_name = <!-- name of a regional grid system --> | grid_position = <!-- position on the regional grid system --> <!-- location --> | subdivision_type = Country | subdivision_name = <!-- the name of the country --> | subdivision_type1 = | subdivision_name1 = | subdivision_type2 = | subdivision_name2 = <!-- etc., subdivision_type6 / subdivision_name6 --> <!-- established --> | established_title = <!-- Founded --> | established_date = <!-- requires established_title= --> | established_title1 = <!-- Incorporated (town) --> | established_date1 = <!-- requires established_title1= --> | established_title2 = <!-- Incorporated (city) --> | established_date2 = <!-- requires established_title2= --> | established_title3 = | established_date3 = <!-- requires established_title3= --> | established_title4 = | established_date4 = <!-- requires established_title4= --> | established_title5 = | established_date5 = <!-- requires established_title5= --> | established_title6 = | established_date6 = <!-- requires established_title6= --> | established_title7 = | established_date7 = <!-- requires established_title7= --> | extinct_title = | extinct_date = | founder = | named_for = <!-- seat, smaller parts --> | seat_type = <!-- defaults to: Seat --> | seat = | seat1_type = <!-- defaults to: Former seat --> | seat1 = | parts_type = <!-- defaults to: Boroughs --> | parts_style = <!-- list, coll (collapsed list), para (paragraph format) --> | parts = <!-- parts text, or header for parts list --> | p1 = | p2 = <!-- etc., up to p50: for separate parts to be listed--> <!-- government type, leaders --> | government_footnotes = <!-- for references: use <ref> tags --> | government_type = | governing_body = | leader_party = | leader_title = | leader_name = <!-- add &amp;nbsp; (no-break space) to disable automatic links --> | leader_title1 = | leader_name1 = <!-- etc., up to leader_title4 / leader_name4 --> <!-- display settings --> | total_type = <!-- to set a non-standard label for total area and population rows --> | unit_pref = <!-- enter: Imperial, to display imperial before metric --> <!-- area --> | area_footnotes = <!-- for references: use <ref> tags --> | area_magnitude = <!-- use only to set a special wikilink --> | dunam_link = <!-- If dunams are used, this specifies which dunam to link. --> | area_total_km2 = <!-- ALL fields with measurements have automatic unit conversion --> | area_total_sq_mi = <!-- see table @ Template:Infobox settlement for details --> | area_total_ha = | area_total_acre = | area_total_dunam = <!-- used in Middle East articles only --> | area_land_km2 = | area_land_sq_mi = | area_land_ha = | area_land_acre = | area_land_dunam = <!-- used in Middle East articles only --> | area_water_km2 = | area_water_sq_mi = | area_water_ha = | area_water_acre = | area_water_dunam = <!-- used in Middle East articles only --> | area_water_percent = | area_urban_footnotes = <!-- for references: use <ref> tags --> | area_urban_km2 = | area_urban_sq_mi = | area_urban_ha = | area_urban_acre = | area_urban_dunam = <!-- used in Middle East articles only --> | area_rural_footnotes = <!-- for references: use <ref> tags --> | area_rural_km2 = | area_rural_sq_mi = | area_rural_ha = | area_rural_acre = | area_rural_dunam = <!-- used in Middle East articles only --> | area_metro_footnotes = <!-- for references: use <ref> tags --> | area_metro_km2 = | area_metro_sq_mi = | area_metro_ha = | area_metro_acre = | area_metro_dunam = <!-- used in Middle East articles only --> | area_rank = | area_blank1_title = | area_blank1_km2 = | area_blank1_sq_mi = | area_blank1_ha = | area_blank1_acre = | area_blank1_dunam = <!-- used in Middle East articles only --> | area_blank2_title = | area_blank2_km2 = | area_blank2_sq_mi = | area_blank2_ha = | area_blank2_acre = | area_blank2_dunam = <!-- used in Middle East articles only --> | area_note = <!-- dimensions --> | dimensions_footnotes = <!-- for references: use <ref> tags --> | length_km = | length_mi = | width_km = | width_mi = <!-- elevation --> | elevation_footnotes = <!-- for references: use <ref> tags --> | elevation_m = | elevation_ft = | elevation_point = <!-- for denoting the measurement point --> | elevation_max_footnotes = <!-- for references: use <ref> tags --> | elevation_max_m = | elevation_max_ft = | elevation_max_point = <!-- for denoting the measurement point --> | elevation_max_rank = | elevation_min_footnotes = <!-- for references: use <ref> tags --> | elevation_min_m = | elevation_min_ft = | elevation_min_point = <!-- for denoting the measurement point --> | elevation_min_rank = <!-- population --> | population_footnotes = <!-- for references: use <ref> tags --> | population_as_of = | population_total = | pop_est_footnotes = | pop_est_as_of = | population_est = | population_rank = | population_density_km2 = <!-- for automatic calculation of any density field, use: auto --> | population_density_sq_mi= | population_urban_footnotes = | population_urban = | population_density_urban_km2 = | population_density_urban_sq_mi = | population_rural_footnotes = | population_rural = | population_density_rural_km2 = | population_density_rural_sq_mi = | population_metro_footnotes = | population_metro = | population_density_metro_km2 = | population_density_metro_sq_mi = | population_density = | population_density_rank = | population_blank1_title = | population_blank1 = | population_density_blank1_km2 = | population_density_blank1_sq_mi= | population_blank2_title = | population_blank2 = | population_density_blank2_km2 = | population_density_blank2_sq_mi= | population_demonym = <!-- demonym, e.g. Liverpudlian for someone from Liverpool --> | population_demonyms = | population_note = <!-- demographics (section 1) --> | demographics_type1 = | demographics1_footnotes = <!-- for references: use <ref> tags --> | demographics1_title1 = | demographics1_info1 = <!-- etc., up to demographics1_title7 / demographics1_info7 --> <!-- demographics (section 2) --> | demographics_type2 = | demographics2_footnotes = <!-- for references: use <ref> tags --> | demographics2_title1 = | demographics2_info1 = <!-- etc., up to demographics2_title10 / demographics2_info10 --> <!-- time zone(s) --> | timezone1 = | utc_offset1 = | timezone1_DST = | utc_offset1_DST = | timezone1_location = | timezone2 = | utc_offset2 = | timezone2_DST = | utc_offset2_DST = | timezone2_location = <!-- postal codes, area code --> | postal_code_type = <!-- enter ZIP Code, Postcode, Post code, Postal code... --> | postal_code = | postal2_code_type = <!-- enter ZIP Code, Postcode, Post code, Postal code... --> | postal2_code = | area_code_type = <!-- defaults to: Area code(s) --> | area_code = | area_codes = | geocode = | iso_code = | registration_plate_type = | registration_plate = | code1_name = | code1_info = | code2_name = | code2_info = <!-- blank fields (section 1) --> | blank_name_sec1 = | blank_info_sec1 = | blank1_name_sec1 = | blank1_info_sec1 = | blank2_name_sec1 = | blank2_info_sec1 = <!-- etc., up to blank7_name_sec1 / blank7_info_sec1 --> <!-- blank fields (section 2) --> | blank_name_sec2 = | blank_info_sec2 = | blank1_name_sec2 = | blank1_info_sec2 = | blank2_name_sec2 = | blank2_info_sec2 = <!-- etc., up to blank7_name_sec2 / blank7_info_sec2 --> <!-- website, footnotes --> | website = <!-- {{URL|example.com}} --> | footnotes = }} </pre> ==Parameter names and descriptions== {| class="wikitable" style="background: white" | colspan=3 style="background: orange; text-align: center;" | ===Name and transliteration=== |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" | '''name''' || optional || This is the usual name in English. If it's not specified, the infobox will use the '''official_name''' as a title unless this too is missing, in which case the page name will be used. |- style="vertical-align:top;" | '''official_name''' || optional || The official name in English if different from '''name''' |- style="vertical-align:top;" | '''native_name''' || optional || Name in the local language, if different from '''name''', and if not English. This will display under the name/official name |- style="vertical-align:top;" | '''native_name_lang''' || optional || Use [[List of ISO 639-2 codes|ISO 639-2 code]], e.g. "fr" for French. If there is more than one native name, in different languages, enter those names using {{tl|lang}}, instead. |- style="vertical-align:top;" | '''other_name''' || optional || For places with a former or more common name like Bombay or Saigon |- style="vertical-align:top;" | '''settlement_type''' || optional || Any type can be entered, such as City, Town, Village, Hamlet, Municipality, Reservation, etc. If set, will be displayed under the names. Might also be used as a label for total population/area (defaulting to ''City''), if needed to distinguish from ''Urban'', ''Rural'' or ''Metro'' (if urban, rural or metro figures are not present, the label is ''Total'' unless '''total_type''' is set). |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Transliteration(s) |- style="vertical-align:top;" | '''translit_lang1''' || optional || Will place the "entry" before the word "transliteration(s)". Can be used to specify a particular language like in [[Dêlêg]] or one may just enter "Other", like in [[Gaza City|Gaza]]'s article. |- style="vertical-align:top;" | '''translit_lang1_type'''<br />'''translit_lang1_type1'''<br />to<br />'''translit_lang1_type6''' || optional || |- style="vertical-align:top;" | '''translit_lang1_info'''<br />'''translit_lang1_info1'''<br />to<br />'''translit_lang1_info6''' || optional || |- style="vertical-align:top;" | '''translit_lang2''' || optional || Will place a second transliteration. See [[Dêlêg]] |- style="vertical-align:top;" | '''translit_lang2_type'''<br />'''translit_lang2_type1'''<br />to<br />'''translit_lang2_type6''' || optional || |- style="vertical-align:top;" | '''translit_lang2_info'''<br />'''translit_lang2_info1'''<br />to<br />'''translit_lang2_info6''' || optional || |- style="vertical-align:top;" | colspan=3 style="background: orange; text-align: center;" | ===Images, nickname, motto=== |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Skyline image |- style="vertical-align:top;" | '''image_skyline''' || optional || Despite the name it can be any image that an editor wishes. |- style="vertical-align:top;" | '''imagesize''' || optional || Can be used to tweak the size of the image_skyline up or down. This can be helpful if an editor wants to make the infobox wider. If used, '''px''' must be specified; default size is 250px. |- style="vertical-align:top;" | '''image_alt''' || optional || [[Alt text]] for the image, used by visually impaired readers who cannot see the image. See [[WP:ALT]]. |- style="vertical-align:top;" | '''image_caption''' || optional || Will place a caption under the image_skyline (if present) |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Flag image |- style="vertical-align:top;" | '''image_flag''' || optional || Used for a flag. |- style="vertical-align:top;" | '''flag_size''' || optional || Can be used to tweak the size of the image_flag up or down from 100px as desired. If used, '''px''' must be specified; default size is 100px. |- style="vertical-align:top;" | '''flag_alt''' || optional || Alt text for the flag. |- style="vertical-align:top;" | '''flag_border''' || optional || Set to 'no' to remove the border from the flag |- style="vertical-align:top;" | '''flag_link''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Seal image |- style="vertical-align:top;" | '''image_seal''' || optional || If the place has an official seal. |- style="vertical-align:top;" | '''seal_size''' || optional || If used, '''px''' must be specified; default size is 100px. |- style="vertical-align:top;" | '''seal_alt''' || optional || Alt text for the seal. |- style="vertical-align:top;" | '''seal_link'''<br />'''seal_type''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Coat of arms image |- style="vertical-align:top;" | '''image_shield''' || optional || Can be used for a place with a coat of arms. |- style="vertical-align:top;" | '''shield_size''' || optional || If used, '''px''' must be specified; default size is 100px. |- style="vertical-align:top;" | '''shield_alt''' || optional || Alt text for the shield. |- style="vertical-align:top;" | '''shield_link''' || optional || Can be used if a wiki article if known but is not automatically linked by the template. See [[Coquitlam, British Columbia]]'s infobox for an example. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Logo or emblem image |- style="vertical-align:top;" | '''image_blank_emblem''' || optional || Can be used if a place has an official logo, crest, emblem, etc. |- style="vertical-align:top;" | '''blank_emblem_type''' || optional || Caption beneath "image_blank_emblem" to specify what type of emblem it is. |- style="vertical-align:top;" | '''blank_emblem_size''' || optional || If used, '''px''' must be specified; default size is 100px. |- style="vertical-align:top;" | '''blank_emblem_alt''' || optional || Alt text for blank emblem. |- style="vertical-align:top;" | '''blank_emblem_link''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Nickname, motto |- style="vertical-align:top;" | '''etymology''' || optional || origin of name |- style="vertical-align:top;" | '''nickname''' || optional || well-known nickname |- style="vertical-align:top;" | '''nicknames''' || optional || if more than one well-known nickname, use this |- style="vertical-align:top;" | '''motto''' || optional || Will place the motto under the nicknames |- style="vertical-align:top;" | '''mottoes''' || optional || if more than one mottoe, use this |- style="vertical-align:top;" | '''anthem''' || optional || Will place the anthem (song) under the nicknames |- style="vertical-align:top;" | colspan=3 style="background: orange; text-align: center;" | ===Maps, coordinates=== |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Map images |- style="vertical-align:top;" | '''image_map''' || optional || |- style="vertical-align:top;" | '''mapsize''' || optional || If used, '''px''' must be specified; default is 250px. |- style="vertical-align:top;" | '''map_alt''' || optional || Alt text for map. |- style="vertical-align:top;" | '''map_caption''' || optional || |- style="vertical-align:top;" | '''image_map1''' || optional || A secondary map image. The field '''image_map''' must be filled in first. Example see: [[Bloomsburg, Pennsylvania]]. |- style="vertical-align:top;" | '''mapsize1''' || optional || If used, '''px''' must be specified; default is 250px. |- style="vertical-align:top;" | '''map_alt1''' || optional || Alt text for secondary map. |- style="vertical-align:top;" | '''map_caption1''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Pushpin map(s), coordinates |- style="vertical-align:top;" | '''pushpin_map''' || optional || The name of a location map as per [[Template:Location map]] (e.g. ''Indonesia'' or ''Russia''). The coordinate fields (from {{para|coordinates}}) position a pushpin coordinate marker and label on the map '''automatically'''. Example: [[Padang, Indonesia]]. To show multiple pushpin maps, provide a list of maps separated by #, e.g., ''California#USA'' |- style="vertical-align:top;" | '''pushpin_mapsize''' || optional || Must be entered as only a number—'''do not use px'''. The default value is 250.<br/>''Equivalent to <code>width</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_map_alt''' || optional || Alt text for pushpin map; used by [[screen reader]]s, see [[WP:ALT]].<br/>''Equivalent to <code>alt</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_map_caption''' || optional || Fill out if a different caption from ''map_caption'' is desired.<br/>''Equivalent to <code>caption</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_map_caption_notsmall''' || optional || <!-- add documentation here --> |- style="vertical-align:top;" | '''pushpin_label''' || optional || The text of the label to display next to the identifying mark; a [[Wiki markup|wikilink]] can be used. If not specified, the label will be the text assigned to the ''name'' or ''official_name'' parameters (if {{para|pushpin_label_position|none}}, no label is displayed).<br/>''Equivalent to <code>label</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_label_position''' || optional || The position of the label on the pushpin map relative to the pushpin coordinate marker. Valid options are {left, right, top, bottom, none}. If this field is not specified, the default value is ''right''.<br/>''Equivalent to <code>position</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_outside''' || optional || ''Equivalent to <code>outside</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_relief''' || optional || Set this to <code>y</code> or any non-blank value to use an alternative relief map provided by the selected location map (if a relief map is available). <br/>''Equivalent to <code>relief</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_image''' || optional || Allows the use of an alternative map; the image must have the same edge coordinates as the location map template.<br/>''Equivalent to <code>AlternativeMap</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''pushpin_overlay''' || optional || Can be used to specify an image to be superimposed on the regular pushpin map.<br/>''Equivalent to <code>overlay_image</code> parameter in [[Template:Location map]].'' |- style="vertical-align:top;" | '''coordinates''' || optional || Latitude and longitude. Use {{tl|Coord}}. See the documentation for {{tl|Coord}} for more details on usage. |- style="vertical-align:top;" | '''coor_pinpoint''' || optional || If needed, to specify more exactly where (or what) coordinates are given (e.g. ''Town Hall'') or a specific place in a larger area (e.g. a city in a county). Example: [[Masovian Voivodeship]] |- style="vertical-align:top;" | '''coordinates_footnotes''' || optional || Reference(s) for coordinates, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''grid_name'''<br />'''grid_position''' || optional || Name of a regional grid system and position on the regional grid |- style="vertical-align:top;" | colspan=3 style="background: orange; text-align: center;" | ===Location, established, seat, subdivisions, government, leaders=== |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Location |- style="vertical-align:top;" | '''subdivision_type''' || optional || almost always <code><nowiki>Country</nowiki></code> |- style="vertical-align:top;" | '''subdivision_name''' || optional || Depends on the subdivision_type—use the name in text form, sample: <code>United States</code>, flag icons or flag templates can be used in this field. |- style="vertical-align:top;" | '''subdivision_type1'''<br />to<br />'''subdivision_type6''' || optional || Can be State/Province, region, county. |- style="vertical-align:top;" | '''subdivision_name1'''<br />to<br />'''subdivision_name6''' || optional || Use the name in text form, sample: <code>Florida</code> or <code><nowiki>[[Florida]]</nowiki></code>. Flag icons or flag templates can be used in this field per [[WP:MOSFLAG]]. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Established |- style="vertical-align:top;" | '''established_title''' || optional || Example: Founded |- style="vertical-align:top;" | '''established_date''' || optional || Requires established_title= |- style="vertical-align:top;" | '''established_title1''' || optional || Example: Incorporated (town) <br/>[Note that "established_title1" is distinct from "established_title"; you can think of "established_title" as behaving like "established_title0".] |- style="vertical-align:top;" | '''established_date1''' || optional || [See note for "established_title1".] Requires established_title1= |- style="vertical-align:top;" | '''established_title2''' || optional || Example: Incorporated (city) |- style="vertical-align:top;" | '''established_date2''' || optional || Requires established_title2= |- style="vertical-align:top;" | '''established_title3''' || optional || |- style="vertical-align:top;" | '''established_date3''' || optional || Requires established_title3= |- style="vertical-align:top;" | '''established_title4''' || optional || |- style="vertical-align:top;" | '''established_date4''' || optional || Requires established_title4= |- style="vertical-align:top;" | '''established_title5''' || optional || |- style="vertical-align:top;" | '''established_date5''' || optional || Requires established_title5= |- style="vertical-align:top;" | '''established_title6''' || optional || |- style="vertical-align:top;" | '''established_date6''' || optional || Requires established_title6= |- style="vertical-align:top;" | '''established_title7''' || optional || |- style="vertical-align:top;" | '''established_date7''' || optional || Requires established_title7= |- style="vertical-align:top;" | '''extinct_title''' || optional || For when a settlement ceases to exist |- style="vertical-align:top;" | '''extinct_date''' || optional || Requires extinct_title= |- style="vertical-align:top;" | '''founder''' || optional || Who the settlement was founded by |- style="vertical-align:top;" | '''named_for''' || optional || The source of the name of the settlement (a person, a place, et cetera) |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Seat of government |- style="vertical-align:top;" | '''seat_type''' || optional || The label for the seat of government (defaults to ''Seat''). |- style="vertical-align:top;" | '''seat''' || optional || The seat of government. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Smaller parts (e.g. boroughs of a city) |- style="vertical-align:top;" | '''parts_type''' || optional || The label for the smaller subdivisions (defaults to ''Boroughs''). |- style="vertical-align:top;" | '''parts_style''' || optional || Set to ''list'' to display as a collapsible list, ''coll'' as a collapsed list, or ''para'' to use paragraph style. Default is ''list'' for up to 5 items, otherwise ''coll''. |- style="vertical-align:top;" | '''parts''' || optional || Text or header of the list of smaller subdivisions. |- style="vertical-align:top;" | '''p1'''<br />'''p2'''<br />to<br />'''p50''' || optional || The smaller subdivisions to be listed. Example: [[Warsaw]] |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Government type, leaders |- style="vertical-align:top;" | '''government_footnotes''' || optional || Reference(s) for government, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''government_type''' || optional || Examples: [[Mayor–council government]], [[Council–manager government]], [[City commission government]], ... |- style="vertical-align:top;" | '''governing_body''' || optional || Name of the place's governing body |- style="vertical-align:top;" | '''leader_party''' || optional || Political party of the place's leader |- style="vertical-align:top;" | '''leader_title''' || optional || First title of the place's leader, e.g. Mayor |- style="vertical-align:top;" | '''leader_name''' || optional || Name of the place's leader |- style="vertical-align:top;" | '''leader_title1'''<br />to<br />'''leader_title4''' || optional || |- style="vertical-align:top;" | '''leader_name1'''<br />to<br />'''leader_name4''' || optional || For long lists use {{tl|Collapsible list}}. See [[Halifax Regional Municipality|Halifax]] for an example. |- style="vertical-align:top;" | colspan=3 style="background: orange; text-align: center;" | ===Geographic information=== |- style="vertical-align:top;" | colspan=3 | These fields have '''dual automatic unit conversion''' meaning that if only metric values are entered, the imperial values will be automatically converted and vice versa. If an editor wishes to over-ride the automatic conversion, e.g. if the source gives both metric and imperial or if a range of values is needed, they should enter both values in their respective fields. |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Display settings |- style="vertical-align:top;" | '''total_type''' || optional || Specifies what "total" area and population figure refer to, e.g. ''Greater London''. This overrides other labels for total population/area. To make the total area and population display on the same line as the words "Area" and "Population", with no "Total" or similar label, set the value of this parameter to '''&nbsp;'''. |- style="vertical-align:top;" | '''unit_pref''' || optional || To change the unit order to ''imperial (metric)'', enter '''imperial'''. The default display style is ''metric (imperial)''. However, the template will swap the order automatically if the '''subdivision_name''' equals some variation of the USA or the UK.<br />For the middle east, a unit preference of [[dunam]] can be entered (only affects total area). <br /> All values must be entered in a '''raw format: no commas, spaces, or unit symbols'''. The template will format them automatically. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Area |- style="vertical-align:top;" | '''area_footnotes''' || optional || Reference(s) for area, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''area_magnitude''' || optional || Setting this to any non-empty value will create a link to the appropriate order of magnitude of area page (e.g. [[1 E+6 m²]]). |- style="vertical-align:top;" | '''dunam_link''' || optional || If dunams are used, the default is to link the word ''dunams'' in the total area section. This can be changed by setting <code>dunam_link</code> to another measure (e.g. <code>dunam_link=water</code>). Linking can also be turned off by setting the parameter to something else (e.g. <code>dunam_link=none</code> or <code>dunam_link=off</code>). |- style="vertical-align:top;" | '''area_total_km2''' || optional || Total area in square kilometers—symbol: km<sup>2</sup>. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square miles if area_total_sq_mi is empty. |- style="vertical-align:top;" | '''area_total_ha''' || optional || Total area in hectares—symbol: ha. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display acres if area_total_acre is empty. |- style="vertical-align:top;" | '''area_total_sq_mi''' || optional || Total area in square miles—symbol: sq&nbsp;mi. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square kilometers if area_total_km2 is empty. |- style="vertical-align:top;" | '''area_total_acre''' || optional || Total area in acres. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display hectares if area_total_ha is empty. |- style="vertical-align:top;" | '''area_total_dunam''' || optional || Total area in dunams, which is wiki-linked. Used in middle eastern places like Israel, Gaza, and the West Bank. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square kilometers or hectares and square miles or acreds if area_total_km2, area_total_ha, area_total_sq_mi, and area_total_acre are empty. Examples: [[Gaza City|Gaza]] and [[Ramallah]] |- style="vertical-align:top;" | '''area_land_km2''' || optional || Land area in square kilometers—symbol: km<sup>2</sup>. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square miles if area_land_sq_mi is empty. |- style="vertical-align:top;" | '''area_land_sq_mi''' || optional || Land area in square miles—symbol: sq&nbsp;mi. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square kilometers if area_land_km2 is empty. |- style="vertical-align:top;" | '''area_land_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_land_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_land_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" | '''area_water_km2''' || optional || Water area in square kilometers—symbol: km<sup>2</sup>. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square miles if area_water_sq_mi is empty. |- style="vertical-align:top;" | '''area_water_sq_mi''' || optional || Water area in square miles—symbol: sq&nbsp;mi. Value must be entered in '''raw format''', no commas or spaces. Auto-converted to display square kilometers if area_water_km2 is empty. |- style="vertical-align:top;" | '''area_water_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_water_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_water_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" | '''area_water_percent''' || optional || percent of water without the "%" |- style="vertical-align:top;" | '''area_urban_km2''' || optional || |- style="vertical-align:top;" | '''area_urban_sq_mi''' || optional || |- style="vertical-align:top;" | '''area_urban_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_urban_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_urban_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" |- style="vertical-align:top;" | '''area_rural_km2''' || optional || |- style="vertical-align:top;" | '''area_rural_sq_mi''' || optional || |- style="vertical-align:top;" | '''area_rural_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_rural_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_rural_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" | '''area_metro_km2''' || optional || |- style="vertical-align:top;" | '''area_metro_sq_mi''' || optional || |- style="vertical-align:top;" | '''area_metro_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_metro_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_metro_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" | '''area_rank''' || optional || The settlement's area, as ranked within its parent sub-division |- style="vertical-align:top;" | '''area_blank1_title''' || optional || Example see London |- style="vertical-align:top;" | '''area_blank1_km2''' || optional || |- style="vertical-align:top;" | '''area_blank1_sq_mi''' || optional || |- style="vertical-align:top;" | '''area_blank1_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_blank1_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_blank1_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" | '''area_blank2_title''' || optional || |- style="vertical-align:top;" | '''area_blank2_km2''' || optional || |- style="vertical-align:top;" | '''area_blank2_sq_mi''' || optional || |- style="vertical-align:top;" | '''area_blank2_ha''' || optional || similar to <code>area_total_ha</code> |- style="vertical-align:top;" | '''area_blank2_dunam''' || optional || similar to <code>area_total_dunam</code> |- style="vertical-align:top;" | '''area_blank2_acre''' || optional || similar to <code>area_total_acre</code> |- style="vertical-align:top;" | '''area_note''' || optional || A place for additional information such as the name of the source. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Dimensions |- style="vertical-align:top;" | '''dimensions_footnotes''' || optional || Reference(s) for dimensions, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''length_km''' || optional || Raw number entered in kilometers. Will automatically convert to display length in miles if length_mi is empty. |- style="vertical-align:top;" | '''length_mi''' || optional || Raw number entered in miles. Will automatically convert to display length in kilometers if length_km is empty. |- style="vertical-align:top;" | '''width_km''' || optional || Raw number entered in kilometers. Will automatically convert to display width in miles if length_mi is empty. |- style="vertical-align:top;" | '''width_mi''' || optional || Raw number entered in miles. Will automatically convert to display width in kilometers if length_km is empty. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Elevation |- style="vertical-align:top;" | '''elevation_footnotes''' || optional || Reference(s) for elevation, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''elevation_m''' || optional || Raw number entered in meters. Will automatically convert to display elevation in feet if elevation_ft is empty. However, if a range in elevation (i.e. 5–50 m ) is desired, use the "max" and "min" fields below |- style="vertical-align:top;" | '''elevation_ft''' || optional || Raw number, entered in feet. Will automatically convert to display the average elevation in meters if '''elevation_m''' field is empty. However, if a range in elevation (e.g. 50–500&nbsp;ft ) is desired, use the "max" and "min" fields below |- style="vertical-align:top;" | '''elevation_max_footnotes'''<br />'''elevation_min_footnotes''' || optional || Same as above, but for the "max" and "min" elevations. See [[Leeds]]. |- style="vertical-align:top;" | '''elevation_max_m'''<br />'''elevation_max_ft'''<br />'''elevation_max_rank'''<br />'''elevation_min_m'''<br />'''elevation_min_ft'''<br />'''elevation_min_rank''' || optional || Used to give highest & lowest elevations and rank, instead of just a single value. Example: [[Halifax Regional Municipality]]. |- style="vertical-align:top;" | colspan=3 style="background: orange; text-align: center;" | ===Population, demographics=== |- style="vertical-align:top;" | colspan=3 | The density fields have '''dual automatic unit conversion''' meaning that if only metric values are entered, the imperial values will be automatically converted and vice versa. If an editor wishes to over-ride the automatic conversion, e.g. if the source gives both metric and imperial or if a range of values is needed, they can enter both values in their respective fields. '''To calculate density with respect to the total area automatically, type ''auto'' in place of any density value.''' |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Population |- style="vertical-align:top;" | '''population_total''' || optional || Actual population (see below for estimates) preferably consisting of digits only (without any commas) |- style="vertical-align:top;" | '''population_as_of''' || optional || The year for the population total (usually a census year) |- style="vertical-align:top;" | '''population_footnotes''' || optional || Reference(s) for population, placed within <nowiki><ref> </ref></nowiki> tags |- style="vertical-align:top;" | '''population_density_km2''' || optional || |- style="vertical-align:top;" | '''population_density_sq_mi''' || optional || |- style="vertical-align:top;" | '''population_est''' || optional || Population estimate. |- style="vertical-align:top;" | '''pop_est_as_of''' || optional || The year or month & year of the population estimate |- style="vertical-align:top;" | '''pop_est_footnotes''' || optional || Reference(s) for population estimate, placed within <nowiki><ref> </ref></nowiki> tags |- style="vertical-align:top;" | '''population_urban''' || optional || |- style="vertical-align:top;" | '''population_urban_footnotes''' || optional || Reference(s) for urban population, placed within <nowiki><ref> </ref></nowiki> tags |- style="vertical-align:top;" | '''population_density_urban_km2''' || optional || |- style="vertical-align:top;" | '''population_density_urban_sq_mi''' || optional || |- style="vertical-align:top;" | '''population_rural''' || optional || |- style="vertical-align:top;" | '''population_rural_footnotes''' || optional || Reference(s) for rural population, placed within <nowiki><ref> </ref></nowiki> tags |- style="vertical-align:top;" | '''population_density_rural_km2''' || optional || |- style="vertical-align:top;" | '''population_density_rural_sq_mi''' || optional || |- style="vertical-align:top;" | '''population_metro''' || optional || |- style="vertical-align:top;" | '''population_metro_footnotes''' || optional || Reference(s) for metro population, placed within <nowiki><ref> </ref></nowiki> tags |- style="vertical-align:top;" | '''population_density_metro_km2''' || optional || |- style="vertical-align:top;" | '''population_density_metro_sq_mi''' || optional || |- style="vertical-align:top;" | '''population_rank''' || optional || The settlement's population, as ranked within its parent sub-division |- style="vertical-align:top;" | '''population_density_rank''' || optional || The settlement's population density, as ranked within its parent sub-division |- style="vertical-align:top;" | '''population_blank1_title''' || optional || Can be used for estimates. Example: [[Windsor, Ontario]] |- style="vertical-align:top;" | '''population_blank1''' || optional || The population value for blank1_title |- style="vertical-align:top;" | '''population_density_blank1_km2''' || optional || |- style="vertical-align:top;" | '''population_density_blank1_sq_mi''' || optional || |- style="vertical-align:top;" | '''population_blank2_title''' || optional || |- style="vertical-align:top;" | '''population_blank2''' || optional || |- style="vertical-align:top;" | '''population_density_blank2_km2''' || optional || |- style="vertical-align:top;" | '''population_density_blank2_sq_mi''' || optional || |- style="vertical-align:top;" | '''population_demonym''' || optional || A demonym or gentilic is a word that denotes the members of a people or the inhabitants of a place. For example, a citizen in [[Liverpool]] is known as a [[Liverpudlian]]. |- style="vertical-align:top;" | '''population_demonyms''' || optional || If more than one demonym, use this |- style="vertical-align:top;" | '''population_note''' || optional || A place for additional information such as the name of the source. See [[Windsor, Ontario]] for example. |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Demographics (section 1) |- style="vertical-align:top;" | '''demographics_type1''' || optional || Section Header. For example: Ethnicity |- style="vertical-align:top;" | '''demographics1_footnotes''' || optional || Reference(s) for demographics section 1, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''demographics1_title1'''<br />to<br />'''demographics1_title7''' || optional || Titles related to demographics_type1. For example: White, Black, Hispanic... |- style="vertical-align:top;" | '''demographics1_info1'''<br />to<br />'''demographics1_info7''' || optional || Information related to the "titles". For example: 50%, 25%, 10%... |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Demographics (section 2) |- style="vertical-align:top;" | '''demographics_type2''' || optional || A second section header. For example: Languages |- style="vertical-align:top;" | '''demographics2_footnotes''' || optional || Reference(s) for demographics section 2, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}} |- style="vertical-align:top;" | '''demographics2_title1'''<br />to<br />'''demographics2_title10''' || optional || Titles related to '''demographics_type2'''. For example: English, French, Arabic... |- style="vertical-align:top;" | '''demographics2_info1'''<br />to<br />'''demographics2_info10''' || optional || Information related to the "titles" for type2. For example: 50%, 25%, 10%... |- style="vertical-align:top;" | colspan=3 style="background: orange; text-align: center;" | ===Other information=== |- style="background: whitesmoke;" ! Parameter name !! Usage !! Description |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Time zone(s) |- style="vertical-align:top;" | '''timezone1''' || optional || |- style="vertical-align:top;" | '''utc_offset1''' || optional || Plain text, e.g. "+05:00" or "-08:00". Auto-linked, so do not include references or additional text. |- style="vertical-align:top;" | '''timezone1_DST''' || optional || |- style="vertical-align:top;" | '''utc_offset1_DST''' || optional || |- style="vertical-align:top;" | '''timezone2''' || optional || A second timezone field for larger areas such as a Province. |- style="vertical-align:top;" | '''utc_offset2''' || optional || |- style="vertical-align:top;" | '''timezone2_DST''' || optional || |- style="vertical-align:top;" | '''utc_offset2_DST''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Postal code(s) & area code |- style="vertical-align:top;" | '''postal_code_type''' || optional || |- style="vertical-align:top;" | '''postal_code''' || optional || |- style="vertical-align:top;" | '''postal2_code_type''' || optional || |- style="vertical-align:top;" | '''postal2_code''' || optional || |- style="vertical-align:top;" | '''area_code_type''' || optional || If left blank/not used template will default to "[[Telephone numbering plan|Area code(s)]]" |- style="vertical-align:top;" | '''area_code''' || optional || |- style="vertical-align:top;" | '''area_codes''' || optional || If more than one area code, use this |- style="vertical-align:top;" | '''geocode''' || optional || See [[Geocode]] |- style="vertical-align:top;" | '''iso_code''' || optional || See [[ISO 3166]] |- style="vertical-align:top;" | '''registration_plate_type''' || optional || If left blank/not used template will default to "[[Vehicle registration plate|Vehicle registration]]" |- style="vertical-align:top;" | '''registration_plate''' || optional || See [[Vehicle registration plate]] |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Blank fields (section 1) |- style="vertical-align:top;" | '''blank_name_sec1''' || optional || Fields used to display other information. The name is displayed in bold on the left side of the infobox. |- style="vertical-align:top;" | '''blank_info_sec1''' || optional || The information associated with the ''blank_name'' heading. The info is displayed on right side of infobox, in the same row as the name. For an example, see: [[Warsaw]] |- style="vertical-align:top;" | '''blank1_name_sec1'''<br />to<br />'''blank7_name_sec1''' || optional || Up to 7 additional fields (8 total) can be displayed in this section |- style="vertical-align:top;" | '''blank1_info_sec1'''<br />to<br />'''blank7_info_sec1''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Blank fields (section 2) |- style="vertical-align:top;" | '''blank_name_sec2''' || optional || For a second section of blank fields |- style="vertical-align:top;" | '''blank_info_sec2''' || optional || Example: [[Beijing]] |- style="vertical-align:top;" | '''blank1_name_sec2'''<br />to<br />'''blank7_name_sec2''' || optional || Up to 7 additional fields (8 total) can be displayed in this section |- style="vertical-align:top;" | '''blank1_info_sec2'''<br />to<br />'''blank7_info_sec2''' || optional || |- style="vertical-align:top;" ! colspan=3 style="background: #DDDDDD;" | Website, footnotes |- style="vertical-align:top;" | '''website''' || optional || External link to official website, Use {{Tl|URL}}, thus: <nowiki>{{URL|example.com}}</nowiki> |- style="vertical-align:top;" | '''footnotes''' || optional || Text to be displayed at the bottom of the infobox |- style="vertical-align:top;" | '''short_description''' || optional || [[WP:SHORTDESC|specify custom short description]]; if not specified, one will be automatically generated, e.g. "Place in Israel". |} <!-- End of parameter name/description table --> ==Examples== ;Example 1: <!-- NOTE: This differs from the actual Chicago infobox in order to provide examples. --> {{Infobox settlement | name = Chicago | settlement_type = [[City (Illinois)|City]] | image_skyline = Chicago montage.jpg | imagesize = 275px <!--default is 250px--> | image_caption = Clockwise from top: [[Downtown Chicago]], the [[Chicago Theatre]], the [[Chicago 'L']], [[Navy Pier]], [[Millennium Park]], the [[Field Museum]], and the [[Willis Tower|Willis (formerly Sears) Tower]] | image_flag = Flag of Chicago, Illinois.svg | image_seal = Seal of Chicago, Illinois.svg | etymology = {{lang-mia|shikaakwa}} ("wild onion" or "wild garlic") | nickname = [[Origin of Chicago's "Windy City" nickname|The Windy City]], The Second City, Chi-Town, Chi-City, Hog Butcher for the World, City of the Big Shoulders, The City That Works, and others found at [[List of nicknames for Chicago]] | motto = {{lang-la|Urbs in Horto}} (''City in a Garden''), Make Big Plans (Make No Small Plans), I Will | image_map = US-IL-Chicago.png | map_caption = Location in the [[Chicago metropolitan area]] and Illinois | pushpin_map = USA | pushpin_map_caption = Location in the United States | coordinates = {{coord|41|50|15|N|87|40|55|W}} | coordinates_footnotes = <ref name="USCB Gazetteer 2010"/> | subdivision_type = Country | subdivision_name = United States | subdivision_type1 = State | subdivision_name1 = [[Illinois]] | subdivision_type2 = [[List of counties in Illinois|Counties]] | subdivision_name2 = [[Cook County, Illinois|Cook]], [[DuPage County, Illinois|DuPage]] | established_title = Settled | established_date = 1770s | established_title2 = [[Municipal corporation|Incorporated]] | established_date2 = March 4, 1837 | founder = | named_for = {{lang-mia|shikaakwa}}<br /> ("Wild onion") | government_type = [[Mayor–council government|Mayor–council]] | leader_title = [[Mayor of Chicago|Mayor]] | leader_name = [[Rahm Emanuel]] | leader_party = [[Democratic Party (United States)|D]] | leader_title1 = [[City council|Council]] | leader_name1 = [[Chicago City Council]] | unit_pref = Imperial | area_footnotes = <ref name="USCB Gazetteer 2010">{{cite web | url = https://www.census.gov/geo/www/gazetteer/files/Gaz_places_national.txt | title = 2010 United States Census Gazetteer for Places: January 1, 2010 | format = text | work = 2010 United States Census | publisher = [[United States Census Bureau]] | date = April 2010 | accessdate = August 1, 2012}}</ref> | area_magnitude = 1 E+8 | area_total_sq_mi = 234.114 | area_land_sq_mi = 227.635 | area_water_sq_mi = 6.479 | area_water_percent = 3 | area_urban_sq_mi = 2123 | area_metro_sq_mi = 10874 | elevation_footnotes = <ref name="GNIS"/> | elevation_ft = 594 | elevation_m = 181 | population_footnotes = <ref name="USCB PopEstCities 2011">{{cite web | url = https://www.census.gov/popest/data/cities/totals/2011/tables/SUB-EST2011-01.csv | title = Annual Estimates of the Resident Population for Incorporated Places Over 50,000, Ranked by July 1, 2011 Population | format = [[comma-separated values|CSV]] | work = 2011 Population Estimates | publisher = [[United States Census Bureau]], Population Division | date = June 2012 | accessdate = August 1, 2012}}</ref><ref name="USCB Metro 2010">{{cite web | url=https://www.census.gov/prod/cen2010/briefs/c2010br-01.pdf | title = Population Change for the Ten Most Populous and Fastest Growing Metropolitan Statiscal Areas: 2000 to 2010 | date = March 2011 | publisher = [[U.S. Census Bureau]] | page = 6 |accessdate = April 12, 2011}}</ref> | population_as_of = [[2010 United States Census|2010]] | population_total = 2695598 | pop_est_footnotes = | pop_est_as_of = 2011 | population_est = 2707120 | population_rank = [[List of United States cities by population|3rd US]] | population_density_sq_mi = 11,892.4<!-- 2011 population_est / area_land_sq_mi --> | population_urban = 8711000 | population_density_urban_sq_mi = auto | population_metro = 9461105 | population_density_metro_sq_mi = auto | population_demonym = Chicagoan | timezone = [[Central Standard Time|CST]] | utc_offset = −06:00 | timezone_DST = [[Central Daylight Time|CDT]] | utc_offset_DST = −05:00 | area_code_type = [[North American Numbering Plan|Area codes]] | area_code = [[Area code 312|312]], [[Area code 773|773]], [[Area code 872|872]] | blank_name = [[Federal Information Processing Standards|FIPS]] code | blank_info = {{FIPS|17|14000}} | blank1_name = [[Geographic Names Information System|GNIS]] feature ID | blank1_info = {{GNIS4|423587}}, {{GNIS4|428803}} | website = {{URL|www.cityofchicago.org}} | footnotes = <ref name="GNIS">{{Cite GNIS|428803|City of Chicago|April 12, 2011}}</ref> }} <source lang="xml" style="overflow:auto; white-space: pre-wrap;"> <!-- NOTE: This differs from the actual Chicago infobox in order to provide examples. --> {{Infobox settlement | name = Chicago | settlement_type = [[City (Illinois)|City]] | image_skyline = Chicago montage.jpg | imagesize = 275px <!--default is 250px--> | image_caption = Clockwise from top: [[Downtown Chicago]], the [[Chicago Theatre]], the [[Chicago 'L']], [[Navy Pier]], [[Millennium Park]], the [[Field Museum]], and the [[Willis Tower|Willis (formerly Sears) Tower]] | image_flag = Flag of Chicago, Illinois.svg | image_seal = Seal of Chicago, Illinois.svg | etymology = {{lang-mia|shikaakwa}} ("wild onion" or "wild garlic") | nickname = [[Origin of Chicago's "Windy City" nickname|The Windy City]], The Second City, Chi-Town, Chi-City, Hog Butcher for the World, City of the Big Shoulders, The City That Works, and others found at [[List of nicknames for Chicago]] | motto = {{lang-la|Urbs in Horto}} (''City in a Garden''), Make Big Plans (Make No Small Plans), I Will | image_map = US-IL-Chicago.png | map_caption = Location in the [[Chicago metropolitan area]] and Illinois | pushpin_map = USA | pushpin_map_caption = Location in the United States | coordinates = {{coord|41|50|15|N|87|40|55|W}} | coordinates_footnotes = <ref name="USCB Gazetteer 2010"/> | subdivision_type = Country | subdivision_name = United States | subdivision_type1 = State | subdivision_name1 = [[Illinois]] | subdivision_type2 = [[List of counties in Illinois|Counties]] | subdivision_name2 = [[Cook County, Illinois|Cook]], [[DuPage County, Illinois|DuPage]] | established_title = Settled | established_date = 1770s | established_title2 = [[Municipal corporation|Incorporated]] | established_date2 = March 4, 1837 | founder = | named_for = {{lang-mia|shikaakwa}}<br /> ("Wild onion") | government_type = [[Mayor–council government|Mayor–council]] | leader_title = [[Mayor of Chicago|Mayor]] | leader_name = [[Rahm Emanuel]] | leader_party = [[Democratic Party (United States)|D]] | leader_title1 = [[City council|Council]] | leader_name1 = [[Chicago City Council]] | unit_pref = Imperial | area_footnotes = <ref name="USCB Gazetteer 2010">{{cite web | url = https://www.census.gov/geo/www/gazetteer/files/Gaz_places_national.txt | title = 2010 United States Census Gazetteer for Places: January 1, 2010 | format = text | work = 2010 United States Census | publisher = [[United States Census Bureau]] | date = April 2010 | accessdate = August 1, 2012}}</ref> | area_magnitude = 1 E+8 | area_total_sq_mi = 234.114 | area_land_sq_mi = 227.635 | area_water_sq_mi = 6.479 | area_water_percent = 3 | area_urban_sq_mi = 2123 | area_metro_sq_mi = 10874 | elevation_footnotes = <ref name="GNIS"/> | elevation_ft = 594 | elevation_m = 181 | population_footnotes = <ref name="USCB PopEstCities 2011">{{cite web | url = https://www.census.gov/popest/data/cities/totals/2011/tables/SUB-EST2011-01.csv | title = Annual Estimates of the Resident Population for Incorporated Places Over 50,000, Ranked by July 1, 2011 Population | format = [[comma-separated values|CSV]] | work = 2011 Population Estimates | publisher = [[United States Census Bureau]], Population Division | date = June 2012 | accessdate = August 1, 2012}}</ref><ref name="USCB Metro 2010">{{cite web | url=https://www.census.gov/prod/cen2010/briefs/c2010br-01.pdf | title = Population Change for the Ten Most Populous and Fastest Growing Metropolitan Statiscal Areas: 2000 to 2010 | date = March 2011 | publisher = [[U.S. Census Bureau]] | page = 6 |accessdate = April 12, 2011}}</ref> | population_as_of = [[2010 United States Census|2010]] | population_total = 2695598 | pop_est_footnotes = | pop_est_as_of = 2011 | population_est = 2707120 | population_rank = [[List of United States cities by population|3rd US]] | population_density_sq_mi = 11,892.4<!-- 2011 population_est / area_land_sq_mi --> | population_urban = 8711000 | population_density_urban_sq_mi = auto | population_metro = 9461105 | population_density_metro_sq_mi = auto | population_demonym = Chicagoan | timezone = [[Central Standard Time|CST]] | utc_offset = −06:00 | timezone_DST = [[Central Daylight Time|CDT]] | utc_offset_DST = −05:00 | area_code_type = [[North American Numbering Plan|Area codes]] | area_code = [[Area code 312|312]], [[Area code 773|773]], [[Area code 872|872]] | blank_name = [[Federal Information Processing Standards|FIPS]] code | blank_info = {{FIPS|17|14000}} | blank1_name = [[Geographic Names Information System|GNIS]] feature ID | blank1_info = {{GNIS4|423587}}, {{GNIS4|428803}} | website = {{URL|www.cityofchicago.org}} | footnotes = <ref name="GNIS">{{Cite GNIS|428803|City of Chicago|April 12, 2011}}</ref> }} </source> ;References {{reflist}} {{clear}} ---- ;Example 2: {{Infobox settlement | name = Detroit | settlement_type = [[City (Michigan)|City]] | official_name = City of Detroit | image_skyline = Detroit Montage.jpg | imagesize = 290px | image_caption = Images from top to bottom, left to right: [[Downtown Detroit]] skyline, [[Spirit of Detroit]], [[Greektown Historic District|Greektown]], [[Ambassador Bridge]], [[Michigan Soldiers' and Sailors' Monument]], [[Fox Theatre (Detroit)|Fox Theatre]], and [[Comerica Park]]. | image_flag = Flag of Detroit, Michigan.svg | image_seal = Seal of Detroit, Michigan.svg | etymology = {{lang-fr|détroit}} ([[strait]]) | nickname = The Motor City, Motown, Renaissance City, The D, Hockeytown, The Automotive Capital of the World, Rock City, The 313 | motto = ''Speramus Meliora; Resurget Cineribus''<br /><small>([[Latin]]: We Hope For Better Things; It Shall Rise From the Ashes)</small> | image_map = Wayne County Michigan Incorporated and Unincorporated areas Detroit highlighted.svg | mapsize = 250x200px | map_caption = Location within [[Wayne County, Michigan]] and the state of [[Michigan]] | pushpin_map = USA | pushpin_map_caption = Location within the [[Contiguous United States|contiguous United States of America]] | coordinates = {{coord|42|19|53|N|83|2|45|W}} | coordinates_footnotes = | subdivision_type = Country | subdivision_name = {{flagu|United States of America}} | subdivision_type1 = State | subdivision_name1 = {{flag|Michigan}} | subdivision_type2 = [[List of counties in Michigan|County]] | subdivision_name2 = [[Wayne County, Michigan|Wayne]] | established_title = Founded | established_date = 1701 | established_title2 = Incorporated | established_date2 = 1806 | government_footnotes = <!-- for references: use<ref> tags --> | government_type = [[Mayor–council government|Mayor–council]] | leader_title = [[List of mayors of Detroit, Michigan|Mayor]] | leader_name = [[Dave Bing]] | leader_party = [[Democratic Party (United States)|D]] | leader_title1 = [[Detroit City Council|City Council]] | leader_name1 = {{collapsible list|bullets=yes | title = Members | 1 = [[Charles Pugh]] – Council President | 2 = [[Gary Brown (Detroit politician)|Gary Brown]] – Council President Pro-Tem | 3 = [[JoAnn Watson]] | 4 = [[Kenneth Cockrel, Jr.]] | 5 = [[Saunteel Jenkins]] | 6 = [[Andre Spivey]] | 7 = [[James Tate (Detroit politician)|James Tate]] | 8 = [[Brenda Jones (Detroit politician)|Brenda Jones]] | 9 = [[Kwame Kenyatta]] }} | unit_pref = Imperial | area_footnotes = | area_magnitude = | area_total_sq_mi = 142.87 | area_total_km2 = 370.03 | area_land_sq_mi = 138.75 | area_land_km2 = 359.36 | area_water_sq_mi = 4.12 | area_water_km2 = 10.67 | area_urban_sq_mi = 1295 | area_metro_sq_mi = 3913 | elevation_footnotes = | elevation_ft = 600 | population_footnotes = | population_as_of = 2011 | population_total = 706585 | population_rank = [[List of United States cities by population|18th in U.S.]] | population_urban = 3863924 | population_metro = 4285832 (US: [[List of United States metropolitan statistical areas|13th]]) | population_blank1_title = [[Combined statistical area|CSA]] | population_blank1 = 5207434 (US: [[List of United States combined statistical areas|11th]]) | population_density_sq_mi= {{#expr:713777/138.8 round 0}} | population_demonym = Detroiter | population_note = | timezone = [[Eastern Time Zone (North America)|EST]] | utc_offset = −5 | timezone_DST = [[Eastern Daylight Time|EDT]] | utc_offset_DST = −4 | postal_code_type = | postal_code = | area_code = [[Area code 313|313]] | blank_name = [[Federal Information Processing Standards|FIPS code]] | blank_info = {{FIPS|26|22000}} | blank1_name = [[Geographic Names Information System|GNIS]] feature ID | blank1_info = {{GNIS4|1617959}}, {{GNIS4|1626181}} | website = [http://www.detroitmi.gov/ DetroitMI.gov] | footnotes = }} <source lang="html" style="overflow:auto; white-space: pre-wrap;"> {{Infobox settlement | name = Detroit | settlement_type = [[City (Michigan)|City]] | official_name = City of Detroit | image_skyline = Detroit Montage.jpg | imagesize = 290px | image_caption = Images from top to bottom, left to right: [[Downtown Detroit]] skyline, [[Spirit of Detroit]], [[Greektown Historic District|Greektown]], [[Ambassador Bridge]], [[Michigan Soldiers' and Sailors' Monument]], [[Fox Theatre (Detroit)|Fox Theatre]], and [[Comerica Park]]. | image_flag = Flag of Detroit, Michigan.svg | image_seal = Seal of Detroit, Michigan.svg | etymology = {{lang-fr|détroit}} ([[strait]]) | nickname = The Motor City, Motown, Renaissance City, The D, Hockeytown, The Automotive Capital of the World, Rock City, The 313 | motto = ''Speramus Meliora; Resurget Cineribus''<br /><small>([[Latin]]: We Hope For Better Things; It Shall Rise From the Ashes)</small> | image_map = Wayne County Michigan Incorporated and Unincorporated areas Detroit highlighted.svg | mapsize = 250x200px | map_caption = Location within [[Wayne County, Michigan]] and the state of [[Michigan]] | pushpin_map = USA | pushpin_map_caption = Location within the [[Contiguous United States|contiguous United States of America]] | coordinates = {{coord|42|19|53|N|83|2|45|W}} | coordinates_footnotes = | subdivision_type = Country | subdivision_name = {{flagu|United States of America}} | subdivision_type1 = State | subdivision_name1 = {{flag|Michigan}} | subdivision_type2 = [[List of counties in Michigan|County]] | subdivision_name2 = [[Wayne County, Michigan|Wayne]] | established_title = Founded | established_date = 1701 | established_title2 = Incorporated | established_date2 = 1806 | government_footnotes = <!-- for references: use<ref> tags --> | government_type = [[Mayor-council government|Mayor-Council]] | leader_title = [[List of mayors of Detroit, Michigan|Mayor]] | leader_name = [[Dave Bing]] | leader_party = [[Democratic Party (United States)|D]] | leader_title1 = [[Detroit City Council|City Council]] | leader_name1 = {{collapsible list|bullets=yes | title = Members | 1 = [[Charles Pugh]] – Council President | 2 = [[Gary Brown (Detroit politician)|Gary Brown]] – Council President Pro-Tem | 3 = [[JoAnn Watson]] | 4 = [[Kenneth Cockrel, Jr.]] | 5 = [[Saunteel Jenkins]] | 6 = [[Andre Spivey]] | 7 = [[James Tate (Detroit politician)|James Tate]] | 8 = [[Brenda Jones (Detroit politician)|Brenda Jones]] | 9 = [[Kwame Kenyatta]] }} | unit_pref = Imperial | area_footnotes = | area_magnitude = | area_total_sq_mi = 142.87 | area_total_km2 = 370.03 | area_land_sq_mi = 138.75 | area_land_km2 = 359.36 | area_water_sq_mi = 4.12 | area_water_km2 = 10.67 | area_urban_sq_mi = 1295 | area_metro_sq_mi = 3913 | elevation_footnotes = | elevation_ft = 600 | population_footnotes = | population_as_of = 2011 | population_total = 706585 | population_rank = [[List of United States cities by population|18th in U.S.]] | population_urban = 3863924 | population_metro = 4285832 (US: [[List of United States metropolitan statistical areas|13th]]) | population_blank1_title = [[Combined statistical area|CSA]] | population_blank1 = 5207434 (US: [[List of United States combined statistical areas|11th]]) | population_density_sq_mi= {{#expr:713777/138.8 round 0}} | population_demonym = Detroiter | population_note = | timezone = [[Eastern Time Zone (North America)|EST]] | utc_offset = −5 | timezone_DST = [[Eastern Daylight Time|EDT]] | utc_offset_DST = −4 | postal_code_type = | postal_code = | area_code = [[Area code 313|313]] | blank_name = [[Federal Information Processing Standards|FIPS code]] | blank_info = {{FIPS|26|22000}} | blank1_name = [[Geographic Names Information System|GNIS]] feature ID | blank1_info = {{GNIS4|1617959}}, {{GNIS4|1626181}} | website = [http://www.detroitmi.gov/ DetroitMI.gov] | footnotes = }} </source> {{clear}} ==Supporting templates== The following is a list of sub-templates used by Infobox settlement. See the [{{fullurl:Special:PrefixIndex|prefix=Infobox+settlement%2F&namespace=10&hideredirects=1}} current list of all sub-templates] for documentation, sandboxes, testcases, etc. # {{tl|Infobox settlement/areadisp}} # {{tl|Infobox settlement/densdisp}} # {{tl|Infobox settlement/dunam}} # {{tl|Infobox settlement/dunam/mag}} # {{tl|Infobox settlement/impus}} # {{tl|Infobox settlement/impus/mag}} # {{tl|Infobox settlement/lengthdisp}} # {{tl|Infobox settlement/link}} # {{tl|Infobox settlement/metric}} # {{tl|Infobox settlement/metric/mag}} # {{tl|Infobox settlement/pref}} ==Microformat== {{UF-hcard-geo}} == TemplateData == {{collapse top}} {{TemplateData header}} <templatedata> { "description": "An Infobox for human settlements (cities, towns, villages, communities) as well as other administrative districts, counties, provinces, et cetera", "params": { "name": { "label": "Common name", "description": "This is the usual name in English. If it's not specified, the infobox will use the 'official_name' as a title unless this too is missing, in which case the page name will be used.", "type": "string", "suggested": true }, "official_name": { "label": "Official name", "description": "The official name in English if different from 'name'", "type": "string", "suggested": true }, "native_name": { "label": "Native name", "description": "This will display under the name/official name", "type": "string", "example": "Distrito Federal de México" }, "native_name_lang": { "label": "Native name language", "description": "Use ISO 639-2 code, e.g. 'fr' for French. If there is more than one native name, in different languages, enter those names using {{lang}}, instead.", "type": "string", "example": "zh" }, "other_name": { "label": "Other name", "description": "For places with a former or more common name like Bombay or Saigon", "type": "string" }, "settlement_type": { "label": "Type of settlement", "description": "Any type can be entered, such as City, Town, Village, Hamlet, Municipality, Reservation, etc. If set, will be displayed under the names, provided that either 'name' or 'official_name' is filled in. Might also be used as a label for total population/area (defaulting to ''City''), if needed to distinguish from ''Urban'', ''Rural'' or ''Metro'' (if urban, rural or metro figures are not present, the label is ''Total'' unless 'total_type' is set).", "type": "string", "aliases": [ "type" ] }, "translit_lang1": { "label": "Transliteration from language 1", "description": "Will place the entry before the word 'transliteration(s)'. Can be used to specify a particular language like in Dêlêg or one may just enter 'Other', like in Gaza's article.", "type": "string" }, "translit_lang1_type": { "label": "Transliteration type for language 1", "type": "line", "example": "[[Hanyu pinyin]]", "description": "The type of transliteration used for the first language" }, "translit_lang1_info": { "label": "Transliteration language 1 info", "description": "Parameters translit_lang2_info1, ... translit_lang2_info6 are also available but not documented here", "type": "string" }, "translit_lang2": { "label": "Transliteration language 2", "description": "Will place a second transliteration. See Dêlêg", "type": "string" }, "image_skyline": { "label": "Image of skyline", "description": "Despite the name it can be any image that an editor wishes.", "type": "wiki-file-name" }, "imagesize": { "label": "Image size", "description": "Can be used to tweak the size of the image_skyline up or down. This can be helpful if an editor wants to make the infobox wider. If used, 'px' must be specified; default size is 250px.", "type": "string" }, "image_alt": { "label": "Image alt text", "description": "Alt (hover) text for the image, used by visually impaired readers who cannot see the image.", "type": "string" }, "image_caption": { "label": "Image caption", "description": "Will place a caption under the image_skyline (if present)", "type": "content" }, "image_flag": { "label": "Flag image", "description": "Used for a flag.", "type": "wiki-file-name" }, "flag_size": { "label": "Flag size", "description": "Can be used to tweak the size of the image_flag up or down from 100px as desired. If used, 'px' must be specified; default size is 100px.", "type": "string" }, "flag_alt": { "label": "Flag alt text", "description": "Alt text for the flag.", "type": "string" }, "flag_border": { "label": "Flag border?", "description": "Set to 'no' to remove the border from the flag", "type": "string", "example": "no" }, "flag_link": { "label": "Flag link", "type": "string", "description": "Link to the flag" }, "image_seal": { "label": "Official seal image", "description": "An image of an official seal, if the place has one", "type": "wiki-file-name" }, "seal_size": { "label": "Seal size", "description": "If used, 'px' must be specified; default size is 100px.", "type": "string" }, "seal_alt": { "label": "Seal alt text", "description": "Alt (hover) text for the seal", "type": "string" }, "seal_link": { "label": "Seal link", "type": "string", "description": "Link to the seal" }, "image_shield": { "label": "Coat of arms/shield image", "description": "Can be used for a place with a coat of arms.", "type": "wiki-file-name" }, "shield_size": { "label": "Shield size", "description": "If used, 'px' must be specified; default size is 100px.", "type": "string", "example": "200px" }, "shield_alt": { "label": "Shield alt text", "description": "Alternate text for the shield.", "type": "string" }, "shield_link": { "label": "Shield link", "description": "Can be used if a wiki article if known but is not automatically linked by the template. See Coquitlam, British Columbia's infobox for an example.", "type": "string" }, "image_blank_emblem": { "label": "Blank emblem image", "description": "Can be used if a place has an official logo, crest, emblem, etc.", "type": "wiki-file-name" }, "blank_emblem_type": { "label": "Blank emblem type", "description": "Caption beneath 'image_blank_emblem' to specify what type of emblem it is.", "type": "string", "example": "Logo" }, "blank_emblem_size": { "label": "Blank emblem size", "description": "If used, 'px' must be specified; default size is 100px.", "type": "string", "example": "200px" }, "blank_emblem_alt": { "label": "Blank emblem alt text", "description": "Alt text for blank emblem.", "type": "string" }, "blank_emblem_link": { "label": "Blank emblem link", "type": "string", "description": "A link to the emblem of custom type" }, "nickname": { "label": "Nickname", "description": "well-known nickname(s)", "type": "string", "example": "Sin City" }, "motto": { "label": "Motto", "description": "Will place the motto under the nicknames", "type": "string" }, "anthem": { "label": "Anthem", "description": "Will place the anthem (song) under the nicknames", "type": "string", "example": "[[Hatikvah]]" }, "image_map": { "label": "Map image", "description": "a map of the region, or a map with the region highlighted within a parent region", "type": "wiki-file-name" }, "mapsize": { "label": "Map size", "description": "If used, 'px' must be specified; default is 250px.", "type": "string" }, "map_alt": { "label": "Map alt text", "description": "Alternate (hover) text for the map", "type": "string" }, "map_caption": { "label": "Map caption", "type": "content", "description": "Caption for the map displayed" }, "image_map1": { "label": "Map 2 image", "description": "A secondary map image. The field 'image_map' must be filled in first. For an example, see [[Bloomsburg, Pennsylvania]].", "example": "File:Columbia County Pennsylvania Incorporated and Unincorporated areas Bloomsburg Highlighted.svg", "type": "wiki-file-name" }, "mapsize1": { "label": "Map 2 size", "description": "If used, 'px' must be specified; default is 250px.", "type": "string", "example": "300px" }, "map_alt1": { "label": "Map 2 alt text", "description": "Alt (hover) text for the second map", "type": "string" }, "map_caption1": { "label": "Map 2 caption", "type": "content", "description": "Caption of the second map" }, "pushpin_map": { "label": "Pushpin map", "description": "The name of a location map (e.g. 'Indonesia' or 'Russia'). The coordinates information (from the coordinates parameter) position a pushpin coordinate marker and label on the map 'automatically'. Example see: Padang, Indonesia", "type": "string", "example": "Indonesia" }, "pushpin_mapsize": { "label": "Pushpin map size", "description": "Must be entered as only a number—do not use px. The default value is 250.", "type": "number", "example": "200" }, "pushpin_map_alt": { "label": "Pushpin map alt text", "description": "Alt (hover) text for the pushpin map", "type": "string" }, "pushpin_map_caption": { "label": "Pushpin map caption", "description": "Fill out if a different caption from ''map_caption'' is desired.", "type": "string", "example": "Map showing Bloomsburg in Pennsylvania" }, "pushpin_label": { "label": "Pushpin label", "type": "line", "example": "Bloomsburg", "description": "Label of the pushpin" }, "pushpin_label_position": { "label": "Pushpin label position", "description": "The position of the label on the pushpin map relative to the pushpin coordinate marker. Valid options are {left, right, top, bottom, none}. If this field is not specified, the default value is ''right''.", "type": "string", "example": "left", "default": "right" }, "pushpin_outside": { "label": "Pushpin outside?", "type": "line" }, "pushpin_relief": { "label": "Pushpin relief", "description": "Set this to 'y' or any non-blank value to use an alternative relief map provided by the selected location map (if a relief map is available).", "type": "string", "example": "y" }, "pushpin_image": { "label": "Pushpin image", "type": "wiki-file-name", "description": "Image to use for the pushpin" }, "pushpin_overlay": { "label": "Pushpin overlay", "description": "Can be used to specify an image to be superimposed on the regular pushpin map.", "type": "wiki-file-name" }, "coordinates": { "label": "Coordinates", "description": "Latitude and longitude. Use {{Coord}}. See the documentation for {{Coord}} for more details on usage.", "type": "wiki-template-name", "example": "{{coord|41|50|15|N|87|40|55|W}}" }, "coor_pinpoint": { "label": "Coordinate pinpoint", "description": "If needed, to specify more exactly where (or what) coordinates are given (e.g. 'Town Hall') or a specific place in a larger area (e.g. a city in a county). Example: Masovian Voivodeship", "type": "string" }, "coordinates_footnotes": { "label": "Coordinates footnotes", "description": "Reference(s) for coordinates, placed within <ref> </ref> tags, possibly using the citing format at {{Cite web}}", "type": "string" }, "subdivision_type": { "label": "Subdivision type 1", "description": "Almost always 'Country'", "type": "string", "example": "[[List of sovereign states|Country]]" }, "subdivision_name": { "label": "Subdivision name 1", "description": "Depends on the subdivision_type—use the name in text form, sample: 'United States', flag icons or flag templates can be used in this field.", "type": "string" }, "subdivision_type1": { "label": "Subdivision type 2", "description": "Additional subdivisions Can be State/Province, region, county.", "type": "string" }, "subdivision_type2": { "label": "Subdivision type 3", "description": "Additional subdivisions Can be State/Province, region, county.", "type": "string" }, "subdivision_type3": { "label": "Subdivision type 4", "description": "Additional subdivisions Can be State/Province, region, county.", "type": "string" }, "subdivision_type4": { "label": "Subdivision type 5", "description": "Additional subdivisions Can be State/Province, region, county.", "type": "string" }, "subdivision_type5": { "label": "Subdivision type 6", "description": "Additional subdivisions Can be State/Province, region, county.", "type": "string" }, "subdivision_type6": { "label": "Subdivision type 7", "description": "Additional subdivisions Can be State/Province, region, county.", "type": "string" }, "subdivision_name1": { "label": "Subdivision name 2", "description": "Use the name in text form, sample: 'Florida' or '[[Florida]]'. Flag icons or flag templates can be used in this field per WP:MOSFLAG.", "type": "string", "example": "[[Connecticut]]" }, "subdivision_name2": { "label": "Subdivision name 3", "description": "Use the name in text form, sample: 'Florida' or '[[Florida]]'. Flag icons or flag templates can be used in this field per WP:MOSFLAG..", "type": "string", "example": "[[Florida]]" }, "subdivision_name3": { "label": "Subdivision name 4", "description": "Use the name in text form, sample: 'Florida' or '[[Florida]]'. Flag icons or flag templates can be used in this field per WP:MOSFLAG..", "type": "string", "example": "[[Utah]]" }, "subdivision_name4": { "label": "Subdivision name 5", "description": "Use the name in text form, sample: 'Florida' or '[[Florida]]'. Flag icons or flag templates can be used in this field per WP:MOSFLAG..", "type": "string", "example": "[[California]]" }, "subdivision_name5": { "label": "Subdivision name 6", "description": "Use the name in text form, sample: 'Florida' or '[[Florida]]'. Flag icons or flag templates can be used in this field per WP:MOSFLAG..", "type": "string", "example": "[[Vermont]]" }, "subdivision_name6": { "label": "Subdivision name 7", "description": "Use the name in text form, sample: 'Florida' or '[[Florida]]'. Flag icons or flag templates can be used in this field per WP:MOSFLAG..", "type": "string", "example": "[[Wyoming]]" }, "established_title": { "label": "First establishment event", "description": "Title of the first establishment event", "type": "string", "example": "First settled" }, "established_date": { "label": "First establishment date", "type": "string", "description": "Date of the first establishment event" }, "established_title1": { "label": "Second establishment event", "description": "Tittle of the second establishment event", "type": "string", "example": "Incorporated as a town" }, "established_date1": { "label": "Second establishment date", "type": "string", "description": "Date of the second establishment event" }, "established_title2": { "label": "Third establishment event", "description": "Title of the third establishment event", "type": "string", "example": "Incorporated as a city" }, "established_date2": { "label": "Third establishment date", "type": "string", "description": "Date of the third establishment event" }, "established_title3": { "label": "Fourth establishment event", "type": "string", "description": "Title of the fourth establishment event", "example": "Incorporated as a county" }, "established_date3": { "label": "Fourth establishment date", "type": "string", "description": "Date of the fourth establishment event" }, "extinct_title": { "label": "Extinction event title", "description": "For when a settlement ceases to exist", "type": "string", "example": "[[Sack of Rome]]" }, "extinct_date": { "label": "Extinction date", "type": "string", "description": "Date the settlement ceased to exist" }, "founder": { "label": "Founder", "description": "Who the settlement was founded by", "type": "string" }, "named_for": { "label": "Named for", "description": "The source of the name of the settlement (a person, a place, et cetera)", "type": "string", "example": "[[Ho Chi Minh]]" }, "seat_type": { "label": "Seat of government type", "description": "The label for the seat of government (defaults to 'Seat').", "type": "string", "default": "Seat" }, "seat": { "label": "Seat of government", "description": "The seat of government.", "type": "string", "example": "[[White House]]" }, "parts_type": { "label": "Type of smaller subdivisions", "description": "The label for the smaller subdivisions (defaults to 'Boroughs').", "type": "string", "default": "Boroughs" }, "parts_style": { "label": "Parts style", "description": "Set to 'list' to display as a collapsible list, 'coll' as a collapsed list, or 'para' to use paragraph style. Default is 'list' for up to 5 items, otherwise 'coll'.", "type": "string", "example": "list" }, "parts": { "label": "Smaller subdivisions", "description": "Text or header of the list of smaller subdivisions.", "type": "string" }, "p1": { "label": "Smaller subdivision 1", "description": "The smaller subdivisions to be listed. Parameters 'p1' to 'p50' can also be used.", "type": "string" }, "government_footnotes": { "label": "Government footnotes", "description": "Reference(s) for government, placed within <ref> </ref> tags, possibly using the citing format at {{Cite web}}", "type": "content" }, "government_type": { "label": "Government type", "description": "The place's type of government", "type": "string", "example": "[[Mayor–council government]]" }, "governing_body": { "label": "Governing body", "description": "Name of the place's governing body", "type": "wiki-page-name", "example": "Legislative Council of Hong Kong" }, "leader_party": { "label": "Leader political party", "description": "Political party of the place's leader", "type": "string" }, "leader_title": { "label": "Leader title", "description": "First title of the place's leader, e.g. Mayor", "type": "string", "example": "[[Governor (United States)|Governor]]" }, "leader_name": { "label": "Leader's name", "description": "Name of the place's leader", "type": "string", "example": "[[Jay Inslee]]" }, "leader_title1": { "label": "Leader title 1", "description": "First title of the place's leader, e.g. Mayor", "type": "string", "example": "Mayor" }, "leader_name1": { "label": "Leader name 1", "description": "Additional names for leaders. Parameters 'leader_name1' .. 'leader_name4' are available. For long lists use {{Collapsible list}}.", "type": "string" }, "total_type": { "label": "Total type", "description": "Specifies what total area and population figure refer to, e.g. 'Greater London'. This overrides other labels for total population/area. To make the total area and population display on the same line as the words Area and Population, with no Total or similar label, set the value of this parameter to '&nbsp;'.", "type": "string" }, "unit_pref": { "label": "Unit preference", "description": "To change the unit order to 'imperial (metric)', enter 'imperial'. The default display style is 'metric (imperial)'. However, the template will swap the order automatically if the 'subdivision_name' equals some variation of the USA or the UK. For the middle east, a unit preference of dunam can be entered (only affects total area). All values must be entered in a raw format: no commas, spaces, or unit symbols. The template will format them automatically.", "type": "string", "example": "imperial" }, "area_footnotes": { "label": "Area footnotes", "description": "Reference(s) for area, placed within <ref> </ref> tags, possibly using the citing format at {Cite web}", "type": "string" }, "area_magnitude": { "label": "Area order of magnitude", "description": "Setting this to any non-empty value will create a link to the appropriate order of magnitude of area page (e.g. [[1 E+6 m²]]).", "type": "string" }, "dunam_link": { "label": "Link dunams?", "description": "If dunams are used, the default is to link the word 'dunams' in the total area section. This can be changed by setting 'dunam_link' to another measure (e.g. 'dunam_link=water'). Linking can also be turned off by setting the parameter to something else (e.g. 'dunam_link=none' or 'dunam_link=off').", "type": "string", "example": "none" }, "area_total_km2": { "label": "Total area (km2)", "description": "Total area in square kilometers—symbol: km². Value must be entered in raw format, no commas or spaces. Auto-converted to display square miles if area_total_sq_mi is empty.", "type": "string" }, "area_total_sq_mi": { "label": "Total area (sq. mi)", "description": "Total area in square miles—symbol: sq mi. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display square kilometers if area_total_km2 is empty.", "type": "string" }, "area_total_ha": { "label": "Total area (hectares)", "description": "Total area in hectares—symbol: ha. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display acres if area_total_acre is empty.", "type": "string" }, "area_total_acre": { "label": "Total area (acres)", "description": "Total area in acres. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display hectares if 'area_total_ha' is empty.", "type": "number" }, "area_total_dunam": { "label": "Total area (dunams)", "description": "Total area in dunams, which is wiki-linked. Used in Middle eastern places like Israel, Gaza, and the West Bank. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display square kilometers or hectares and square miles or acres if area_total_km2, area_total_ha, area_total_sq_mi, and area_total_acre are empty. Examples: Gaza and Ramallah", "type": "number", "example": "69" }, "area_land_km2": { "label": "Land area (sq. km)", "description": "Land area in square kilometers—symbol: km^2. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display square miles if 'area_land_sq_mi' is empty.", "type": "number" }, "area_land_sq_mi": { "label": "Land area (sq. mi)", "description": "Land area in square miles—symbol: sq mi. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display square kilometers if 'area_land_km2' is empty.", "type": "number" }, "area_land_ha": { "label": "Land area (hectares)", "description": "The place's land area in hectares", "type": "number" }, "area_land_dunam": { "label": "Land area (dunams)", "description": "The place's land area in dunams", "type": "number" }, "area_land_acre": { "label": "Land area (acres)", "description": "The place's land area in acres", "type": "number" }, "area_water_km2": { "label": "Water area (sq. km)", "description": "Water area in square kilometers symbol: km^2. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display square miles if 'area_water_sq_mi' is empty.", "type": "number" }, "area_water_sq_mi": { "label": "Water area (sq. mi)", "description": "Water area in square miles symbol: sq mi. Value must be entered in 'raw format', no commas or spaces. Auto-converted to display square kilometers if 'area_water_km2' is empty.", "type": "number" }, "area_water_ha": { "label": "Water area (hectares)", "description": "The place's water area in hectares", "type": "number" }, "area_water_dunam": { "label": "Water area (dunams)", "description": "The place's water area in dunams", "type": "number" }, "area_water_acre": { "label": "Water area (acres)", "description": "The place's water area in acres", "type": "number" }, "area_water_percent": { "label": "Percent water area", "description": "percent of water without the %.", "type": "number", "example": "21" }, "area_urban_km2": { "label": "Urban area (sq. km)", "type": "number", "description": "Area of the place's urban area in square kilometers" }, "area_urban_sq_mi": { "label": "Urban area (sq. mi)", "type": "number", "description": "Area of the place's urban area in square miles" }, "area_urban_ha": { "label": "Urban area (hectares)", "description": "Area of the place's urban area in hectares", "type": "number" }, "area_urban_dunam": { "label": "Urban area (dunams)", "description": "Area of the place's urban area in dunams", "type": "number" }, "area_urban_acre": { "label": "Urban area (acres)", "description": "Area of the place's urban area in acres", "type": "number" }, "area_urban_footnotes": { "label": "Urban area footnotes", "description": "Reference(s) for the urban area, placed within <ref> </ref> tags, possibly using the citing format at {Cite web}", "type": "string" }, "area_rural_km2": { "label": "Rural area (sq. km)", "type": "number", "description": "Area of the place's rural area in square kilometers" }, "area_rural_sq_mi": { "label": "Rural area (sq. mi)", "type": "number", "description": "Area of the place's rural area in square miles" }, "area_rural_ha": { "label": "Rural area (hectares)", "description": "Area of the place's rural area in hectares", "type": "number" }, "area_rural_dunam": { "label": "Rural area (dunams)", "description": "Area of the place's rural area in dunams", "type": "number" }, "area_rural_acre": { "label": "Rural area (acres)", "description": "Area of the place's rural area in acres", "type": "number" }, "area_rural_footnotes": { "label": "Rural area footnotes", "description": "Reference(s) for the urban area, placed within <ref> </ref> tags, possibly using the citing format at {Cite web}", "type": "string" }, "area_metro_km2": { "label": "Metropolitan area (sq. km)", "type": "number", "description": "Area of the place's metropolitan area in square kilometers" }, "area_metro_sq_mi": { "label": "Metropolitan area (sq. mi)", "type": "number", "description": "Area of the place's metropolitan area in square miles" }, "area_metro_ha": { "label": "Metropolitan area (hectares)", "description": "Area of the place's metropolitan area in hectares", "type": "number" }, "area_metro_dunam": { "label": "Metropolitan area (dunams)", "description": "Area of the place's metropolitan area in dunams", "type": "number" }, "area_metro_acre": { "label": "Metropolitan area (acres)", "description": "Area of the place's metropolitan area in acres", "type": "number" }, "area_metro_footnotes": { "label": "Metropolitan area footnotes", "description": "Reference(s) for the urban area, placed within <ref> </ref> tags, possibly using the citing format at {Cite web}", "type": "string" }, "area_rank": { "label": "Area rank", "description": "The settlement's area, as ranked within its parent sub-division", "type": "string" }, "area_blank1_title": { "label": "First blank area section title", "description": "Title of the place's first custom area section", "type": "string", "example": "see [[London]]" }, "area_blank1_km2": { "label": "Area blank 1 (sq. km)", "type": "number", "description": "Area of the place's first blank area section in square kilometers" }, "area_blank1_sq_mi": { "label": "Area blank 1 (sq. mi)", "type": "number", "description": "Area of the place's first blank area section in square miles" }, "area_blank1_ha": { "label": "Area blank 1 (hectares)", "description": "Area of the place's first blank area section in hectares", "type": "number" }, "area_blank1_dunam": { "label": "Area blank 1 (dunams)", "description": "Area of the place's first blank area section in dunams", "type": "number" }, "area_blank1_acre": { "label": "Area blank 1 (acres)", "description": "Area of the place's first blank area section in acres", "type": "number" }, "area_blank2_title": { "label": "Second blank area section title", "type": "string", "description": "Title of the place's second custom area section" }, "area_blank2_km2": { "label": "Area blank 2 (sq. km)", "type": "number", "description": "Area of the place's second blank area section in square kilometers" }, "area_blank2_sq_mi": { "label": "Area blank 2 (sq. mi)", "type": "number", "description": "Area of the place's second blank area section in square miles" }, "area_blank2_ha": { "label": "Area blank 2 (hectares)", "description": "Area of the place's third blank area section in hectares", "type": "number" }, "area_blank2_dunam": { "label": "Area blank 2 (dunams)", "description": "Area of the place's third blank area section in dunams", "type": "number" }, "area_blank2_acre": { "label": "Area blank 2 (acres)", "description": "Area of the place's third blank area section in acres", "type": "number" }, "area_note": { "label": "Area footnotes", "description": "A place for additional information such as the name of the source.", "type": "content", "example": "<ref name=\"CenPopGazetteer2016\">{{cite web|title=2016 U.S. Gazetteer Files|url=https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2016_Gazetteer/2016_gaz_place_42.txt|publisher=United States Census Bureau|accessdate=Aug 13, 2017}}</ref>" }, "dimensions_footnotes": { "label": "Dimensions footnotes", "description": "Reference(s) for dimensions, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}}", "type": "content" }, "length_km": { "label": "Length in km", "description": "Raw number entered in kilometers. Will automatically convert to display length in miles if length_mi is empty.", "type": "string" }, "length_mi": { "label": "Length in miles", "description": "Raw number entered in miles. Will automatically convert to display length in kilometers if length_km is empty.", "type": "string" }, "width_km": { "label": "Width in kilometers", "description": "Raw number entered in kilometers. Will automatically convert to display width in miles if length_mi is empty.", "type": "number" }, "width_mi": { "label": "Width in miles", "description": "Raw number entered in miles. Will automatically convert to display width in kilometers if length_km is empty.", "type": "number" }, "elevation_m": { "label": "Elevation in meters", "description": "Raw number entered in meters. Will automatically convert to display elevation in feet if elevation_ft is empty. However, if a range in elevation (i.e. 5–50 m ) is desired, use the 'max' and 'min' fields below", "type": "number" }, "elevation_ft": { "label": "Elevation in feet", "description": "Raw number, entered in feet. Will automatically convert to display the average elevation in meters if 'elevation_m' field is empty. However, if a range in elevation (i.e. 50–500 ft ) is desired, use the 'max' and 'min' fields below", "type": "number" }, "elevation_footnotes": { "label": "Elevation footnotes", "description": "Reference(s) for elevation, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}}", "type": "string" }, "elevation_min_point": { "type": "line", "label": "Point of min elevation", "description": "The name of the point of lowest elevation in the place", "example": "[[Death Valley]]" }, "elevation_min_m": { "label": "Minimum elevation (m)", "type": "number", "description": "The minimum elevation in meters" }, "elevation_min_ft": { "label": "Minimum elevation (ft)", "type": "number", "description": "The minimum elevation in feet" }, "elevation_min_rank": { "type": "line", "label": "Minimum elevation rank", "description": "The point of minimum elevation's rank in the parent region", "example": "1st" }, "elevation_min_footnotes": { "label": "Min elevation footnotes", "type": "content", "description": "Footnotes or citations for the minimum elevation" }, "elevation_max_point": { "type": "line", "label": "Point of max elevation", "description": "The name of the point of highest elevation in the place", "example": "[[Mount Everest]]" }, "elevation_max_m": { "label": "Maximum elevation (m)", "type": "number", "description": "The maximum elevation in meters" }, "elevation_max_ft": { "label": "Maximum elevation (ft)", "type": "number", "description": "The maximum elevation in feet" }, "elevation_max_rank": { "type": "line", "label": "Maximum elevation rank", "description": "The point of maximum elevation's rank in the parent region", "example": "2nd" }, "elevation_max_footnotes": { "label": "Max elevation footnotes", "type": "content", "description": "Footnotes or citations for the maximum elevation" }, "population_total": { "label": "Population total", "description": "Actual population (see below for estimates) preferably consisting of digits only (without any commas)", "type": "number" }, "population_as_of": { "label": "Population total figure's year", "description": "The year for the population total (usually a census year)", "type": "number" }, "population_footnotes": { "label": "Population footnotes", "description": "Reference(s) for population, placed within <nowiki><ref> </ref></nowiki> tags", "type": "content" }, "population_density_km2": { "label": "Population density (per square km)", "type": "string", "description": "The place's population density per square kilometer", "example": "auto" }, "population_density_sq_mi": { "label": "Population density (per square mi)", "type": "string", "description": "The place's population density per square mile", "example": "auto" }, "population_est": { "label": "Population estimate", "description": "Population estimate, e.g. for growth projections 4 years after a census", "type": "number", "example": "331000000" }, "pop_est_as_of": { "label": "Population estimate figure as of", "description": "The year or month & year of the population estimate", "type": "date" }, "pop_est_footnotes": { "label": "Population estimate footnotes", "description": "Reference(s) for population estimate, placed within <nowiki><ref> </ref></nowiki> tags", "type": "content", "example": "<ref name=\"USCensusEst2016\"/>" }, "population_urban": { "label": "Urban population", "type": "number", "description": "The place's urban population" }, "population_urban_footnotes": { "label": "Urban population footnotes", "description": "Reference(s) for urban population, placed within <nowiki><ref> </ref></nowiki> tags", "type": "content" }, "population_density_urban_km2": { "label": "Ubran population density (per square km)", "type": "string", "description": "The place's urban population density per square kilometer", "example": "auto" }, "population_density_urban_sq_mi": { "label": "Urban population density (per square mi)", "type": "string", "description": "The place's urban population density per square mile", "example": "auto" }, "population_rural": { "label": "Rural population", "type": "number", "example": "69,000", "description": "The place's rural population" }, "population_rural_footnotes": { "label": "Rural population footnotes", "description": "Reference(s) for rural population, placed within <nowiki><ref> </ref></nowiki> tags", "type": "content" }, "population_density_rural_km2": { "label": "Rural population density per sq. km", "type": "line", "description": "The place's rural population density per square kilometer", "example": "auto" }, "population_density_rural_sq_mi": { "label": "Rural population density per sq. mi", "type": "line", "description": "The place's rural population density per square mile", "example": "auto" }, "population_metro": { "label": "Metropolitan area population", "type": "string", "description": "Population of the place's metropolitan area" }, "population_metro_footnotes": { "label": "Metropolitan area population footnotes", "description": "Reference(s) for metro population, placed within <nowiki><ref> </ref></nowiki> tags", "type": "string" }, "population_density_metro_km2": { "label": "Metropolitan population density per sq. km", "type": "string", "description": "The place's metropolitan area's population density per square kilometer", "example": "auto" }, "population_density_metro_sq_mi": { "label": "Metropolitan population density per sq. mi", "type": "string", "description": "The place's metropolitan area's population density per square mile", "example": "auto" }, "population_rank": { "label": "Population rank", "description": "The settlement's population, as ranked within its parent sub-division", "type": "string" }, "population_density_rank": { "label": "Population density rank", "description": "The settlement's population density, as ranked within its parent sub-division", "type": "string" }, "population_blank1_title": { "label": "Custom population type 1 title", "description": "Can be used for estimates. Example: Windsor, Ontario", "type": "string", "example": "See: [[Windsor, Ontarioo]]" }, "population_blank1": { "label": "Custom population type 1", "description": "The population value for blank1_title", "type": "string" }, "population_density_blank1_km2": { "label": "Custom population type 1 density per sq. km", "type": "string", "description": "Population density per square kilometer according to the 1st custom population type" }, "population_density_blank1_sq_mi": { "label": "Custom population type 1 density per sq. mi", "type": "string", "description": "Population density per square mile according to the 1st custom population type" }, "population_blank2_title": { "label": "Custom population type 2 title", "description": "Can be used for estimates. Example: Windsor, Ontario", "type": "string", "example": "See: [[Windsor, Ontarioo]]" }, "population_blank2": { "label": "Custom population type 2", "description": "The population value for blank2_title", "type": "string" }, "population_density_blank2_km2": { "label": "Custom population type 2 density per sq. km", "type": "string", "description": "Population density per square kilometer according to the 2nd custom population type" }, "population_density_blank2_sq_mi": { "label": "Custom population type 2 density per sq. mi", "type": "string", "description": "Population density per square mile according to the 2nd custom population type" }, "population_demonym": { "label": "Demonym", "description": "A demonym or gentilic is a word that denotes the members of a people or the inhabitants of a place. For example a citizen in Liverpool is known as a Liverpudlian.", "type": "line", "example": "Liverpudlian" }, "population_note": { "label": "Population note", "description": "A place for additional information such as the name of the source. See Windsor, Ontario for example.", "type": "content" }, "demographics_type1": { "label": "Demographics type 1", "description": "A sub-section header", "type": "string", "example": "Ethnicities" }, "demographics1_footnotes": { "label": "Demographics section 1 footnotes", "description": "Reference(s) for demographics section 1, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}}", "type": "content" }, "demographics1_title1": { "label": "Demographics section 1 title 1", "description": "Titles related to demographics_type1. For example: White, Black, Hispanic... Additional rows 'demographics1_title1' to 'demographics1_title5' are also available", "type": "string" }, "demographics_type2": { "label": "Demographics type 2", "description": "A second sub-section header", "type": "line", "example": "Languages" }, "demographics2_footnotes": { "label": "Demographics section 2 footnotes", "description": "Reference(s) for demographics section 2, placed within <nowiki><ref> </ref></nowiki> tags, possibly using the citing format at {{tl|Cite web}}", "type": "string" }, "demographics2_title1": { "label": "Demographics section 2 title 1", "description": "Titles related to demographics_type1. For example: English, French, Arabic... Additional rows 'demographics2_title2' to 'demographics1_title5' are also available", "type": "string" }, "demographics2_info1": { "label": "Demographics section 2 info 1", "description": "Information related to the titles. For example: 50%, 25%, 10%... Additional rows 'demographics2_info2' to 'demographics2_info5' are also available", "type": "content" }, "timezone1": { "label": "Timezone 1", "type": "string", "description": "The place's primary time-zone", "example": "[[Eastern Standard Time]]" }, "utc_offset": { "label": "UTC offset", "type": "string", "description": "The place's time-zone's offset from UTC", "example": "+8" }, "timezone_DST": { "label": "Timezone during DST", "type": "string", "description": "The place's time-zone during daylight savings time, if applicable", "example": "[[Eastern Daylight Time]]" }, "utc_offset_DST": { "label": "UTC offset during DST", "type": "string", "description": "The place's time-zone's UTC offset during daylight savings time, if applicable", "example": "+9" }, "utc_offset1": { "label": "UTC offset 1", "type": "string", "description": "The place's primary time-zone's offset from UTC", "example": "-5" }, "timezone1_DST": { "label": "Timezone 1 (during DST)", "type": "string", "description": "The place's primary time-zone during daylight savings time, if applicable", "example": "[[Eastern Daylight Time]]" }, "utc_offset1_DST": { "label": "UTC offset 1 (during DST)", "type": "string", "description": "The place's primary time-zone's UTC offset during daylight savings time, if applicable", "example": "-6" }, "timezone2": { "label": "Timezone 2", "description": "A second timezone field for larger areas such as a Province.", "type": "string", "example": "[[Central Standard Time]]" }, "utc_offset2": { "label": "UTC offset 2", "type": "string", "description": "The place's secondary time-zone's offset from UTC ", "example": "-6" }, "timezone2_DST": { "label": "Timezone 2 during DST", "type": "string", "description": "The place's secondary time-zone during daylight savings time, if applicable", "example": "[[Central Daylight Time]]" }, "utc_offset2_DST": { "label": "UTC offset 2 during DST", "type": "string", "description": "The place's secondary time-zone's offset from UTC during daylight savings time, if applicable", "example": "-7" }, "postal_code_type": { "label": "Postal code type", "description": "Label used for postal code info, e.g. 'ZIP Code'. Defaults to 'Postal code'.", "example": "[[Postal code of China|Postal code]]", "type": "string" }, "postal_code": { "label": "Postal code", "description": "The place's postal code/zip code", "type": "string", "example": "90210" }, "postal2_code_type": { "label": "Postal code 2 type", "type": "string", "description": "If applicable, the place's second postal code type" }, "postal2_code": { "label": "Postal code 2", "type": "string", "description": "A second postal code of the place, if applicable", "example": "90007" }, "area_code": { "label": "Area code", "description": "The regions' telephone area code", "type": "string" }, "area_code_type": { "label": "Area code type", "description": "If left blank/not used template will default to 'Area code(s)'", "type": "string" }, "geocode": { "label": "Geocode", "description": "See [[Geocode]]", "type": "string" }, "iso_code": { "label": "ISO 3166 code", "description": "See ISO 3166", "type": "string" }, "registration_plate": { "label": "Registration/license plate info", "description": "See Vehicle registration plate", "type": "string" }, "blank_name_sec1": { "label": "Blank name section 1", "description": "Fields used to display other information. The name is displayed in bold on the left side of the infobox.", "type": "string" }, "blank_info_sec1": { "label": "Blank info section 1", "description": "The information associated with the \"blank_name_sec1\" heading. The info is displayed on right side of infobox, in the same row as the name. For an example, see: [[Warsaw]]", "type": "content" }, "blank1_name_sec1": { "label": "Blank 1 name section 1", "description": "Up to 7 additional fields 'blank1_name_sec1' ... 'blank7_name_sec1' can be specified", "type": "string" }, "blank1_info_sec1": { "label": "Blank 1 info section 1", "description": "Up to 7 additional fields 'blank1_info_sec1' ... 'blank7_info_sec1' can be specified", "type": "content" }, "blank_name_sec2": { "label": "Blank name section 2", "description": "For a second section of blank fields", "type": "string" }, "blank_info_sec2": { "label": "Blank info section 2", "example": "Beijing", "type": "content", "description": "The information associated with the \"blank_name_sec2\" heading. The info is displayed on right side of infobox, in the same row as the name. For an example, see: [[Warsaw]]" }, "blank1_name_sec2": { "label": "Blank 1 name section 2", "description": "Up to 7 additional fields 'blank1_name_sec2' ... 'blank7_name_sec2' can be specified", "type": "string" }, "blank1_info_sec2": { "label": "Blank 1 info section 2", "description": "Up to 7 additional fields 'blank1_info_sec2' ... 'blank7_info_sec2' can be specified", "type": "content" }, "website": { "label": "Official website in English", "description": "External link to official website, Use the {{URL}} template, thus: {{URL|example.com}}", "type": "string" }, "footnotes": { "label": "Footnotes", "description": "Text to be displayed at the bottom of the infobox.", "type": "content" }, "translit_lang1_info1": { "label": "Language 1 first transcription ", "description": "Transcription of type 1 in the first other language", "example": "{{lang|zh|森美兰}}", "type": "line" }, "translit_lang1_type1": { "label": "Language 1 first transcription type", "description": "Type of transcription used in the first language's first transcription", "example": "[[Chinese Language|Chinese]]", "type": "line" }, "translit_lang1_info2": { "label": "Language 1 second transcription ", "description": "Transcription of type 1 in the first other language", "example": "{{lang|ta|நெகிரி செம்பிலான்}}", "type": "line" }, "translit_lang1_type2": { "label": "Language 1 second transcription type", "description": "Type of transcription used in the first language's first transcription", "example": "[[Tamil Language|Tamil]]", "type": "line" }, "demographics1_info1": { "label": "Demographics section 1 info 1", "description": "Information related to the titles. For example: 50%, 25%, 10%... Additional rows 'demographics1_info1' to 'demographics1_info5' are also available", "type": "content" } }, "format": "{{_\n| _______________________________ = _\n}}\n" } </templatedata> {{collapse bottom}} ==Calls and redirects == At least {{PAGESINCATEGORY:Templates calling Infobox settlement}} other [[:Category:Templates calling Infobox settlement|templates call this one]]. [{{fullurl:Special:WhatLinksHere/Template:Infobox_settlement|namespace=10&hidetrans=1&hidelinks=1}} Several templates redirect here], but the only redirect in article space is [[Template:Infobox Settlement]] having around 6700 transclusions, oldest article from 2008, most recent from 2009. More than 5000 of these articles are bot generated and related to Poland. [https://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Infobox_Settlement&namespace=0&limit=5000&hideredirs=1&hidelinks=1&from=21823944&back=0] == Tracking categories == # {{clc|Pages using infobox settlement with a dot map}} # {{clc|Pages using infobox settlement with bad settlement type}} # {{clc|Pages using infobox settlement with imprecise region codes}} # {{clc|Pages using infobox settlement with missing country}} # {{clc|Pages using infobox settlement with possible area code list}} # {{clc|Pages using infobox settlement with possible demonym list}} # {{clc|Pages using infobox settlement with possible motto list}} # {{clc|Pages using infobox settlement with possible nickname list}} # {{clc|Pages using infobox settlement with the image parameter}} # {{clc|Pages using infobox settlement with the wikidata parameter}} # {{clc|Pages using infobox settlement with unknown parameters}} # {{clc|Templates calling Infobox settlement}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!--Categories below this line, please; interwikis at Wikidata--> [[Category:City infobox templates|Settlement]] [[Category:Geography infobox templates|Settlement]] [[Category:Embeddable templates]] [[Category:Infobox templates using Wikidata]] [[Category:Templates that add a tracking category]] }}</includeonly> <noinclude>{{Documentation}}</noinclude> 2172048feab8901ce17b8a64093a96f305cf554e Template:Documentation/doc 10 7 10 2024-05-28T03:19:35Z Armoleb 2 Created page with "<noinclude>{{pp-semi-indef}} </noinclude>{{Distinguish|Template:Documentation subpage}} {{Documentation subpage}} {{template shortcut|doc}} {{High-use}} {{Lua|Module:Documentation}} {{Never substitute}} This is the '''{{tlx|documentation}}''' template used on almost every [[Help:A quick guide to templates|template page]] to contain that template's documented instructions and information, including [[Wikipedia:TemplateData|<templatedata>]], on either the template page its..." wikitext text/x-wiki <noinclude>{{pp-semi-indef}} </noinclude>{{Distinguish|Template:Documentation subpage}} {{Documentation subpage}} {{template shortcut|doc}} {{High-use}} {{Lua|Module:Documentation}} {{Never substitute}} This is the '''{{tlx|documentation}}''' template used on almost every [[Help:A quick guide to templates|template page]] to contain that template's documented instructions and information, including [[Wikipedia:TemplateData|<templatedata>]], on either the template page itself, or a created documentation subpage. For detailed instructions on how and when to use this template, see [[Wikipedia:Template documentation]] (shortcut: [[WP:TDOC]]). This template displays a green documentation box, like you are seeing now, and automatically loads the content from a /doc subpage. It can also load the content from other places, if instructed to do so. This template is intended for documenting templates and other pages that are [[Wikipedia:Transclusion|transcluded]] onto other pages. It can be used in the [[Wikipedia:Template namespace|template namespace]] and most other [[Wikipedia:Namespace|namespace]]s. Use of this template allows templates to be [[Wikipedia:Protection policy|protected]], where necessary, while allowing anyone to edit the documentation and categories. ==Usage== Normally, this template is used without any parameters, and is placed at the bottom of the template page or other page being documented, within a {{tag|noinclude}} container: <syntaxhighlight lang="xml+smarty"> <!--Last line of your template code--><noinclude> {{Documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude> </syntaxhighlight> Then, this template automatically loads the content from the /doc subpage of the template it is used on. This template can also load the content from any other page. For example: <syntaxhighlight lang="xml+smarty"> <!--Last line of your template code--><noinclude> {{Documentation |Template:Other page/doc}} </noinclude> </syntaxhighlight> Note that when loading the documentation from a page other than the local /doc subpage, it becomes tricky to handle the categories. The content can also be fed directly as text. For example: <syntaxhighlight lang="xml"> <!--Last line of your template code--><noinclude> {{Documentation | content = <!-- template documentation --> }}</noinclude> </syntaxhighlight> When the {{para|content}} parameter is used, the doc box normally does not show the [edit] [purge] links in the top right corner. Note that if the /doc page exists, a link to it is still shown in the link box below the doc box. Parameter {{para|1}} and the {{para|content}} parameter can also be combined, for example: <syntaxhighlight lang="xml"> <!--Last line of your template code--><noinclude> {{Documentation |1=Template:Any page/doc | content = <!-- {{Template:Any page/doc |parameters}} --> }}</noinclude> </syntaxhighlight> Then, the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But, the '''content''' parameter is used for the content shown in the doc box. The above code means that the content is transcluded as {{tnull|Template:Any page/doc{{!}}parameters}}. In this example, a parameter is also fed to the /doc page being loaded. ==Placement and tags== This code should be added at the bottom of the template code page, with no space before {{Tag|noinclude|o}} (which causes extra whitespace to show on pages where the template is transcluded): <syntaxhighlight lang="xml"><!--Last line of your template code--><noinclude> {{documentation}} </noinclude></syntaxhighlight> To automatically insert the [[Wikipedia:Noinclude|noinclude tags]], the template call and the guiding comment, you can also use this [[Wikipedia:Substitution|substitution]] code shortcut: {{tlxs|doc-code}} Which results in: <syntaxhighlight lang="xml"><!--Last line of your template code--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> </noinclude></syntaxhighlight> ===Categorization=== When a documentation subpage is created by using this template, then to place the template itself into a category, add <code><nowiki>[[Category:Category name]]</nowiki></code> inside an {{tag|includeonly|p|content={{((}}Sandbox other{{!!}}...{{))}}}} section on the /doc subpage. For example, for placement on the documentation subpage: <syntaxhighlight lang="xml" style="overflow:auto;"> {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> == Usage == <includeonly>{{sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Category name]] [[Category:Category name2]] }}</includeonly> </syntaxhighlight> When a documentation subpage has not been created, and the documentation template is being used with a {{para|content}} parameter on the actual template page, then to place the template itself into a category, add <code><nowiki>[[Category:Category name]]</nowiki></code> inside the documentation template, after the content. For example, for placement on the actual template page: <syntaxhighlight lang="xml" style="overflow:auto;"> <!--Last line of your template code--><noinclude> {{Documentation | content = <!-- template documentation --> [[Category:Category name]] [[Category:Category name2]] }}</noinclude> </syntaxhighlight> Interwiki links that apply to the template should be listed at [[d:|Wikidata]] (more at [[Wikipedia:Wikidata]]). For more complex cases, see {{section link|Wikipedia:Template documentation#Categories and interwiki links}}. ==Heading== When in the Template namespace, this template shows this heading: :[[File:Test Template Info-Icon - Version (2).svg|32px|link=[[Wikipedia:Template documentation]]]] '''Template documentation''' In most other namespaces, such as "Wikipedia:", it shows this heading: :'''Documentation''' But when on File (image) pages it shows this heading: :'''Summary''' The '''heading''' parameter can be used to set the heading to something else. For example: :<code><nowiki>{{Documentation |heading=Infobox documentation}}</nowiki></code> If the '''heading''' parameter is empty but defined, no heading is shown and no [edit] [purge] links are shown. For example: :<code><nowiki>{{Documentation |heading=}}</nowiki></code> The '''heading-style''' parameter can be fed optional [[Cascading Style Sheets|CSS]] values. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example: :<code>heading-style=font-size:150%;color:red;</code> ==Link box== Below the big doc box is a small link box that shows some meta-data about the documentation. The link box shows different things depending on what parameters are fed to this template, and in which namespace it is used. In some cases, the link box is not shown at all. To hide the link box, add the parameter {{para|link box|off}}. You can also insert customised text into the link box, by setting the {{para|link box}} parameter. For example: :<code><nowiki> |link box=This documentation is automatically generated by [[Template:Country showdata]]</nowiki></code> ==Automatic functions== If the documentation page does not exist, the [create] link includes a [[mw:Manual:Creating pages with preloaded text|preload]] page so that clicking it will pre-fill the edit form with the basic documentation page format. Preload text is also used for the /sandbox and /testcases [create] links. When this template is on a protected template page it now automatically adds {{tl|pp-template}}, which shows the grey or red padlock in the top right corner. So no need to manually add {{tlf|pp-template}} to templates that use {{tl|Documentation}}. When this template is on a /sandbox subpage it automatically adds the {{tl|Template sandbox notice}}. ==Subject namespaces vs. talk namespaces== Terminology: ''Subject namespaces'' are the opposite of ''talk namespaces''. For instance "Template:" is the subject space of "Template talk:". This template is usually placed in a subject namespace, within {{tag|noinclude|o}} tags. But in some cases this template needs to be on the talk page: * In the Mediawiki namespace, since {{tag|noinclude|o}} often does not work in system messages, and since the Mediawiki namespace needs to be kept clean for performance reasons. When placed on talk pages, this template usually is placed near the top of the page and without {{tag|noinclude}} tags. The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki [[meta:Help:Link#Subpage feature|subpage feature]] enabled: Main, File, and Mediawiki. (Categories can have subpages, but documentation is created in the Category talk namespace to prevent creating empty categories.) (But currently we only show the /sandbox and /testcases links from User, User talk, Template and Template talk namespaces.) There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those) namespaces. This template automatically points its [create] links for the /doc, /sandbox and /testcases to the right namespace. ==Testing== You can simulate the output for a given page by using the {{para|page}} parameter. For example, if you use the code {{para|page|Template:Edit protected}}, the template will behave exactly as if it were on the page [[Template:Edit protected]], including showing the documentation from [[Template:Edit protected/doc]], linking to [[Template:Edit protected/sandbox]], etc. This parameter is useful for testing and is used extensively on the [[Module:Documentation/testcases|module testcases page]]. ==Technical details== The preload page for the /doc [create] link is [[Template:Documentation/preload]]. The preload pages for the /sandbox and /testcases [create] links are [[Template:Documentation/preload-sandbox]] and [[Template:Documentation/preload-testcases]]. The preload page for the /sandbox [mirror] link is [[Template:Documentation/mirror]]. For more details, see the [[Template talk:Documentation|talk page]]. ===Full syntax=== <pre> {{Documentation}} or {{Documentation | content = }} or {{Documentation | [path to documentation page] | heading-style = | heading = | link box = }} </pre> ==See also== * {{tl|Documentation subpage}}, a notice placed at the top of a /doc subpage explaining its role and including a link to the page it documents. * {{tl|Barnstar documentation}}, a variant of {{tl|Documentation}} for use with [[Wikipedia:Barnstars|barnstar]] templates. * {{tl|Documentation/color scheme}} presents the color scheme used by {{tl|Documentation}}. * [[Wikipedia:Template documentation]] is a how-to guide to template documentation. * [[Wikipedia:Template sandbox and test cases]] explains the use of /sandbox and /testcases subpages and includes more information about template testing. <includeonly><!-- Make sure that only page [[Template:Documentation]] is categorised. No other page (no subpages, not when transcluded). -->{{#ifeq:{{FULLPAGENAME}}|Template:Documentation| [[Category:Template documentation| ]] [[Category:Template namespace templates|Documentation]] }}</includeonly> c49db28355d74648a17713f7a8e4facfd0d65ebf Template:Infobox test 10 8 11 2024-05-28T20:08:49Z Armoleb 2 Created page with "<div style="border:1px solid #aaa; background-color:#f9f9f9; padding:5px; width:300px; float:right; margin-left:10px;"> <div style="background-color:#f2f2f2; padding:5px; font-size:120%; font-weight:bold;"> {{{title}}} </div> <div style="padding:5px;"> <b>Capital:</b> {{{capital}}}<br> <b>Population:</b> {{{population}}}<br> <b>Area:</b> {{{area}}}<br> <b>Government:</b> {{{government}}}<br> </div> </div>" wikitext text/x-wiki <div style="border:1px solid #aaa; background-color:#f9f9f9; padding:5px; width:300px; float:right; margin-left:10px;"> <div style="background-color:#f2f2f2; padding:5px; font-size:120%; font-weight:bold;"> {{{title}}} </div> <div style="padding:5px;"> <b>Capital:</b> {{{capital}}}<br> <b>Population:</b> {{{population}}}<br> <b>Area:</b> {{{area}}}<br> <b>Government:</b> {{{government}}}<br> </div> </div> 1986146e6f5519dc035c0200a881e976e848abb1 Template:Infobox test/doc 10 9 12 2024-05-28T20:17:19Z Armoleb 2 Created page with "=== Usage === This template creates an infobox for nation roleplay entries. === Parameters === ;title : The title of the infobox. ;capital : The capital city. ;population : The population of the nation. ;area : The area of the nation. ;government : The type of government. === Example === <nowiki>{{Infobox |title = Example Nation |capital = Example City |population = 1,000,000 |area = 50,000 km² |government = Republic }}</nowiki> This will produce: {{Inf..." wikitext text/x-wiki === Usage === This template creates an infobox for nation roleplay entries. === Parameters === ;title : The title of the infobox. ;capital : The capital city. ;population : The population of the nation. ;area : The area of the nation. ;government : The type of government. === Example === <nowiki>{{Infobox |title = Example Nation |capital = Example City |population = 1,000,000 |area = 50,000 km² |government = Republic }}</nowiki> This will produce: {{Infobox |title = Example Nation |capital = Example City |population = 1,000,000 |area = 50,000 km² |government = Republic }} 1ab768912aadcbb8e43b34b6a1f763f58a9f79af 13 12 2024-05-28T20:25:32Z Armoleb 2 wikitext text/x-wiki === Usage === This template creates an infobox for nation roleplay entries. === Parameters === ;title : The title of the infobox. ;capital : The capital city. ;population : The population of the nation. ;area : The area of the nation. ;government : The type of government. === Example === <nowiki>{{Infobox test |title = Example Nation |capital = Example City |population = 1,000,000 |area = 50,000 km² |government = Republic }}</nowiki> This will produce: {{Infobox test |title = Example Nation |capital = Example City |population = 1,000,000 |area = 50,000 km² |government = Republic }} e1b73183aa1a30b978cad4131f4e8ba33e59486c Module:Infobox 828 10 15 2024-05-28T20:29:49Z Armoleb 2 Created page with "local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows..." Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub( category_in_empty_row_pattern, '' ):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ base_templatestyles, -- see function description templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 05a758c4532f643205b2300a5935f5d4ef3fc721 18 15 2024-05-28T20:38:05Z Armoleb 2 Scribunto text/plain -- -- This module implements {{Infobox}} -- local p = {} local args = {} local origArgs = {} local root local function notempty( s ) return s and s:match( '%S' ) end local function fixChildBoxes(sval, tt) if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end local function union(t1, t2) -- Returns the union of the values of two tables, as a sequence. local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end local function getArgNums(prefix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end local function addRow(rowArgs) -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. if rowArgs.header and rowArgs.header ~= '_BLANK_' then root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :attr('id', rowArgs.rowid) :tag('th') :attr('colspan', 2) :attr('id', rowArgs.headerid) :addClass(rowArgs.class) :addClass(args.headerclass) :css('text-align', 'center') :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) elseif rowArgs.data then if not rowArgs.data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then rowArgs.rowstyle = 'display:none' end local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) row:attr('id', rowArgs.rowid) if rowArgs.label then row :tag('th') :attr('scope', 'row') :attr('id', rowArgs.labelid) :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') if not rowArgs.label then dataCell :attr('colspan', 2) :css('text-align', 'center') end dataCell :attr('id', rowArgs.dataid) :addClass(rowArgs.class) :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) end end local function renderTitle() if not args.title then return end root :tag('caption') :addClass(args.titleclass) :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end root :tag('tr') :tag('th') :attr('colspan', 2) :addClass(args.aboveclass) :css('text-align', 'center') :css('font-size', '125%') :css('font-weight', 'bold') :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end root :tag('tr') :tag('td') :attr('colspan', '2') :addClass(args.belowclass) :css('text-align', 'center') :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addRow({ data = args['subheader' .. tostring(num)], datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :cssText(args.captionstyle) :wikitext(caption) end addRow({ data = tostring(data), datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end local function preprocessRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]', ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end local function renderRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)], dataid = args['dataid' .. tostring(num)], labelid = args['labelid' .. tostring(num)], headerid = args['headerid' .. tostring(num)], rowid = args['rowid' .. tostring(num)] }) end end local function _infobox() -- Specify the overall layout of the infobox, with special settings -- if the infobox is used as a 'child' inside another infobox. if args.child ~= 'yes' then root = mw.html.create('table') root :addClass((args.subbox ~= 'yes') and 'infobox' or nil) :addClass(args.bodyclass) if args.subbox == 'yes' then root :css('padding', '0') :css('border', 'none') :css('margin', '-3px') :css('width', 'auto') :css('min-width', '100%') :css('font-size', '100%') :css('clear', 'none') :css('float', 'none') :css('background-color', 'transparent') else root :css('width', '22em') end root :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end renderSubheaders() renderImages() if args.autoheaders then preprocessRows() end renderRows() renderBelowRow() return tostring(root) end local function preprocessSingleArg(argName) -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end local function preprocessArgs(prefixTable, step) -- Assign the parameters with the given prefixes to the args table, in order, in batches -- of the step size specified. This is to prevent references etc. from appearing in the -- wrong order. The prefixTable should be an array containing tables, each of which has -- two possible fields, a "prefix" string and a "depend" table. The function always parses -- parameters containing the "prefix" string, but only parses parameters in the "depend" -- table if the prefix parameter is present and non-blank. if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones. preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present and not blank, or -- we are processing "prefix1" and "prefix" is present and not blank, and -- if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end local function parseDataParameters() -- Parse the data parameters in the same order that the old {{infobox}} did, so that -- references etc. will display in the expected places. Parameters that depend on -- another parameter are only processed if that parameter is present, to avoid -- phantom references appearing in article reference lists. preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'}, {prefix = 'dataid'}, {prefix = 'labelid'}, {prefix = 'headerid'}, {prefix = 'rowid'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') preprocessSingleArg('decat') end function p.infobox(frame) -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end function p.infoboxTemplate(frame) -- For calling via #invoke within a template origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 77c36bd0082b84d380e58f5e3e5d66508688aba8 Template:Infobox 10 11 16 2024-05-28T20:33:04Z Armoleb 2 Created page with "{{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Module:Infobox/styles.css 828 12 17 2024-05-28T20:34:11Z Armoleb 2 Created page with "/* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; borde..." sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7